Module org.mule.runtime.dsl.api
Class DefaultXmlLoggerErrorHandler
java.lang.Object
org.mule.runtime.dsl.internal.xml.parser.DefaultXmlLoggerErrorHandler
- All Implemented Interfaces:
XmlGathererErrorHandler,ErrorHandler
Default implementation of
XmlGathererErrorHandler which collects all errors, and on a fatal exception will propagate an
exception.
If logging is enabled, it will also log all warnings, errors and fatal when encountered.
Instances of this class are not reusable among several readings of
MuleDocumentLoader#loadDocument(Supplier, InputSource, EntityResolver, ErrorHandler, int, boolean) as it holds state of
the exceptions that were gathered.- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoid
-
Constructor Details
-
DefaultXmlLoggerErrorHandler
public DefaultXmlLoggerErrorHandler()
-
-
Method Details
-
warning
- Specified by:
warningin interfaceErrorHandler- Throws:
SAXException
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXException
-
error
- Specified by:
errorin interfaceErrorHandler- Throws:
SAXException
-
getErrors
- Specified by:
getErrorsin interfaceXmlGathererErrorHandler- Returns:
- a collection with all the
SAXParseExceptionexceptions gathered fromErrorHandler.error(SAXParseException). An empty list means there were no error while parsing the file. Non null.
-