Exceptions - xmlunit/user-guide GitHub Wiki

Exceptions

One thing that makes working with JAXP tedious is the plethora of checked exceptions declared for almost any method one would want to use. The lack of checked exceptions in .NET means only XMLUnit for Java needed to deal with this.

XMLUnit for Java doesn't specify any checked exceptions inside its public API. Rather than that it catches all the fancy TransformerConfigurationExceptions and friends, wraps them into XMLUnitException (which are RuntimeExceptions) and rethrows them. Only using RuntimeExceptions is a conscious decision that greatly simplifies the API.

There is a special subclass ConfigurationException of XMLUnitException that is used to wrap the various *ConfigurationExceptions of JAXP.