[jboss-jira] [JBoss JIRA] Resolved: (JBXB-252) config option to warn on parser errors instead of throwing errors

Alexey Loubyansky (JIRA) jira-events at lists.jboss.org
Wed Aug 4 09:34:49 EDT 2010


     [ https://jira.jboss.org/browse/JBXB-252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Loubyansky resolved JBXB-252.
------------------------------------

    Resolution: Done


I've added a boolean property called warnOnParserErrors which can be set on UnmarshallerFactory and/or Unmarshaller.

   /**
    * This property controls whether the (underlying) parser errors should be
    * logged as warnings or should they terminate parsing with errors.
    * The default is to terminate parsing by re-throwing parser errors.
    * 
    * @return false if parser errors should be logged as warnings, otherwise - true
    */
   public boolean getWarnOnParserErrors()

Note, this affects only SAX exceptions reported as errors in SAX ErrorHandler (which means schema constraints validation errors). It doesn't affect fatalErrors, i.e. having received a fatal error (such as not a well-formed XML) the parsing will be immediately terminated.

> config option to warn on parser errors instead of throwing errors
> -----------------------------------------------------------------
>
>                 Key: JBXB-252
>                 URL: https://jira.jboss.org/browse/JBXB-252
>             Project: JBoss XML Binding (JBossXB)
>          Issue Type: Feature Request
>            Reporter: Alexey Loubyansky
>            Assignee: Alexey Loubyansky
>             Fix For: JBossXB-2.0.2.GA
>
>
> It might be useful to log a warning instead of terminating parsing with an error if a document doesn't satisfy some schema constraints.
> The original request is JBAS-8268

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list