ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Boisvert" <boisv...@intalio.com>
Subject Re: svn commit: r666271 - /ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
Date Tue, 10 Jun 2008 19:23:06 GMT
Shouldn't the return be (isWarning)?  since we don't want to stop processing
for warnings...

alex

On Tue, Jun 10, 2008 at 11:48 AM, <mriou@apache.org> wrote:

> Author: mriou
> Date: Tue Jun 10 11:48:40 2008
> New Revision: 666271
>
> URL: http://svn.apache.org/viewvc?rev=666271&view=rev
> Log:
> That was a little too nice.
>
> Modified:
>
>  ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
>
> Modified:
> ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
> URL:
> http://svn.apache.org/viewvc/ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java?rev=666271&r1=666270&r2=666271&view=diff
>
> ==============================================================================
> ---
> ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
> (original)
> +++
> ode/trunk/utils/src/main/java/org/apache/ode/utils/xsd/SchemaModelImpl.java
> Tue Jun 10 11:48:40 2008
> @@ -101,10 +101,18 @@
>
>     private static class SchemaErrorHandler implements DOMErrorHandler {
>         public boolean handleError(DOMError error) {
> -            __log.warn("Schema error",
> ((Exception)error.getRelatedException()));
> -            __log.warn(error.getLocation().getUri() + ":" +
> error.getLocation().getLineNumber());
> -            __log.warn(error.getRelatedData());
> -            __log.warn(error.getRelatedException());
> +            boolean isWarning = (error.getSeverity() ==
> DOMError.SEVERITY_WARNING);
> +            if (isWarning) {
> +                __log.warn("Schema error",
> ((Exception)error.getRelatedException()));
> +                __log.warn(error.getLocation().getUri() + ":" +
> error.getLocation().getLineNumber());
> +                __log.warn(error.getRelatedData());
> +                __log.warn(error.getRelatedException());
> +            } else {
> +                __log.error("Schema error",
> ((Exception)error.getRelatedException()));
> +                __log.error(error.getLocation().getUri() + ":" +
> error.getLocation().getLineNumber());
> +                __log.error(error.getRelatedData());
> +                __log.error(error.getRelatedException());
> +            }
>             return false;
>         }
>     }
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message