com.thebuzzmedia.sjxp
Class XMLParserException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.thebuzzmedia.sjxp.XMLParserException
- All Implemented Interfaces:
- Serializable
public class XMLParserException
- extends RuntimeException
Unchecked exception used to unify and report everything that can go wrong
during an XML parse.
Using this helps simplify caller code by allowing them to optionally catch
this unchecked exception. Each exception of this type will include a detailed
explanation of what caused the underlying exception to occur and avoids
pushing up the concerns of the underlying impl to the caller.
90% of the time you just want to parse XML and know if it succeeded or
failed, so SJXP simplifies for this scenario.
For callers that do want to know exactly what went wrong, you can use
Throwable.getCause()
to get the source exception that this one is wrapping.
- Author:
- Riyad Kalla (software@thebuzzmedia.com)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
XMLParserException
public XMLParserException(String message)
- Create a new exception with the given message.
- Parameters:
message
- The explanation of why the exception was thrown.
XMLParserException
public XMLParserException(String message,
Exception cause)
- Create a new exception with the given message and cause.
- Parameters:
message
- The explanation of why the exception was thrown.cause
- The underlying exception that occurred that caused this one to
be created.