Package org.apache.juneau.parser
Class ParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.BasicRuntimeException
org.apache.juneau.parser.ParseException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- SchemaValidationException
Exception that indicates invalid syntax encountered during parsing.
 
See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionParseException(String message, Object... args) Constructor.ParseException(Throwable causedBy) Constructor.ParseException(Throwable causedBy, String message, Object... args) Constructor.ParseException(ParserSession session, Exception causedBy) Constructor.ParseException(ParserSession session, String message, Object... args) Constructor.ParseException(ParserSession session, Throwable causedBy, String message, Object... args) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionstatic ParseExceptionCreator method.Returns the highest-levelParseException in the stack trace.Methods inherited from class org.apache.juneau.BasicRuntimeExceptionassertModifiable, fillInStackTrace, getCause, getMessage, initCause, isUnmodifiable, setMessage, setStackTrace, setUnmodifiable, unwrapMethods inherited from class java.lang.ThrowableaddSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, toString
- 
Constructor Details- 
ParseExceptionConstructor.- Parameters:
- message- The- MessageFormat-style message.
- args- Optional- MessageFormat-style arguments.
 
- 
ParseExceptionConstructor.- Parameters:
- causedBy- The cause of this exception.
- message- The- MessageFormat-style message.
- args- Optional- MessageFormat-style arguments.
 
- 
ParseExceptionConstructor.- Parameters:
- causedBy- The cause of this exception.
 
- 
ParseExceptionConstructor.- Parameters:
- session- The parser session.
- message- The exception message containing- MessageFormat-style arguments.
- args- Optional- MessageFormat-style arguments.
 
- 
ParseExceptionConstructor.- Parameters:
- session- The parser session.
- causedBy- The cause of this exception.
- message- The exception message containing- MessageFormat-style arguments.
- args- Optional- MessageFormat-style arguments.
 
- 
ParseExceptionConstructor.- Parameters:
- session- The parser session.
- causedBy- The inner exception.
 
 
- 
- 
Method Details- 
createCreator method.If the throwable is already a ParseException, we simply return that exception as-is. If the throwable is anInvocationTargetException, we unwrap the thrown exception. Otherwise we create a newParseException.- Parameters:
- e- The exception being wrapped or unwrapped.
- Returns:
- A new SerializeException.
 
- 
getRootCauseReturns the highest-levelParseException in the stack trace.Useful for JUnit testing of error conditions. - Returns:
- The root parse exception, or this exception if there isn't one.
 
 
-