com.thebuzzmedia.sjxp
Class XMLParserException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by 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

Constructor Summary
XMLParserException(String message)
          Create a new exception with the given message.
XMLParserException(String message, Exception cause)
          Create a new exception with the given message and cause.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.

Copyright 2011 The Buzz Media, LLC