You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stefan Bodewig edited this page Jan 8, 2016
·
1 revision
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.