A feature introduced in CookXml since 2.0 is the ability to handle exceptions. This feature allows developers to intercept these exceptions and deal with them, by logging, suppressing, or generating an error. This tutorial basically teaches how it works inside CookXml.
ExceptionHandler can be set or get on a global basis by calling CookXml.setDefaultExceptionHandler(ExceptionHandler defaultExceptionHandler) and CookXml.getDefaultExceptionHandler (). This default handler is called when individual CookXml objects do not have their ExceptionHandler set.
Individual CookXml ExceptionHandler can be set/get by calling CookXml..setExceptionHandler(ExceptionHandler exceptionHandler) and CookXml.getEceptionHandler (), respectively.
The following table shows the major exceptions intercepted in chronological ordering.
There are other types of exceptions as well.
Finally, if an exception occurs in CookXml.xmlDecode function, it will not be wrapped around by CookXmlException.
What to Do with the Exception
Well, here is a list of things off the top of my head.