Package org.apache.commons.jexl3
Class JexlException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.commons.jexl3.JexlException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- JexlException.Annotation,- JexlException.Break,- JexlException.Cancel,- JexlException.Continue,- JexlException.Method,- JexlException.Operator,- JexlException.Parsing,- JexlException.Property,- JexlException.Return,- JexlException.StackOverflow,- JexlException.Throw,- JexlException.Tokenization,- JexlException.TryFailed,- JexlException.Variable,- JxltEngine.Exception
Wraps any error that might occur during interpretation of a script or expression.
- Since:
- 2.0
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classThrown when parsing fails due to an ambiguous statement.static classThrown when an annotation handler throws an exception.static classThrown when parsing fails due to an invalid assignment.static classThrown to break a loop.static classThrown to cancel a script execution.static classThrown to continue a loop.static classThrown when parsing fails due to a disallowed feature.static classThrown when a method or ctor is unknown, ambiguous or inaccessible.static classThrown when an operator fails.static classThrown when parsing fails.static classThrown when a property is unknown.static classThrown to return a value.static classThrown when reaching stack-overflow.static classThrown to throw a value.static classThrown when tokenization fails.static classThrown when method/ctor invocation fails.static classThrown when a variable is unknown.static enumThe various type of variable issues.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionJexlException(JexlInfo jinfo, String msg, Throwable cause) Creates a new JexlException.JexlException(org.apache.commons.jexl3.parser.JexlNode node, String msg) Creates a new JexlException.JexlException(org.apache.commons.jexl3.parser.JexlNode node, String msg, Throwable cause) Creates a new JexlException.protectedJexlException(org.apache.commons.jexl3.parser.JexlNode node, String msg, Throwable cause, boolean trace) Creates a new JexlException.
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringannotationError(org.apache.commons.jexl3.parser.JexlNode node, String annotation) Generates a message for an annotation error.clean()Cleans a JexlException from any org.apache.commons.jexl3.internal stack trace element.protected StringAccesses detailed message.final StringGets the exception specific detailgetInfo()Gets the specific information for this exception.static JexlInfoDeprecated.3.2Detailed info message about this error.protected JexlInfoinfo()Pleasing checkstyle.static StringmethodError(org.apache.commons.jexl3.parser.JexlNode node, String method) Deprecated.3.2static StringmethodError(org.apache.commons.jexl3.parser.JexlNode node, String method, Object[] args) Generates a message for a unsolvable method error.static StringoperatorError(org.apache.commons.jexl3.parser.JexlNode node, String symbol) Generates a message for an operator error.protected StringparserError(String prefix, String expr) Formats an error message from the parser.static StringpropertyError(org.apache.commons.jexl3.parser.JexlNode node, String var) Deprecated.3.2static StringpropertyError(org.apache.commons.jexl3.parser.JexlNode node, String pty, boolean undef) Generates a message for an unsolvable property error.static StringsliceSource(String src, int froml, int fromc, int tol, int toc) Removes a slice from a source.static JexlExceptiontryFailed(InvocationTargetException xinvoke) Wrap an invocation exception.static StringvariableError(org.apache.commons.jexl3.parser.JexlNode node, String variable, boolean undef) Deprecated.3.2static StringvariableError(org.apache.commons.jexl3.parser.JexlNode node, String variable, JexlException.VariableIssue issue) Generates a message for a variable error.Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
JexlExceptionCreates a new JexlException.- Parameters:
- jinfo- the debugging information associated
- msg- the error message
- cause- the exception causing the error
 
- 
JexlExceptionCreates a new JexlException.- Parameters:
- node- the node causing the error
- msg- the error message
 
- 
JexlExceptionCreates a new JexlException.- Parameters:
- node- the node causing the error
- msg- the error message
- cause- the exception causing the error
 
- 
JexlExceptionprotected JexlException(org.apache.commons.jexl3.parser.JexlNode node, String msg, Throwable cause, boolean trace) Creates a new JexlException.- Parameters:
- node- the node causing the error
- msg- the error message
- cause- the exception causing the error
- trace- whether this exception has a stack trace and can not be suppressed
 
 
- 
- 
Method Details- 
annotationErrorpublic static String annotationError(org.apache.commons.jexl3.parser.JexlNode node, String annotation) Generates a message for an annotation error.- Parameters:
- node- the node where the error occurred
- annotation- the annotation name
- Returns:
- the error message
- Since:
- 3.1
 
- 
getInfo@Deprecated public static JexlInfo getInfo(org.apache.commons.jexl3.parser.JexlNode node, JexlInfo info) Deprecated.3.2Gets the most specific information attached to a node.- Parameters:
- node- the node
- info- the information
- Returns:
- the information or null
 
- 
methodError@Deprecated public static String methodError(org.apache.commons.jexl3.parser.JexlNode node, String method) Deprecated.3.2Generates a message for a unsolvable method error.- Parameters:
- node- the node where the error occurred
- method- the method name
- Returns:
- the error message
 
- 
methodErrorpublic static String methodError(org.apache.commons.jexl3.parser.JexlNode node, String method, Object[] args) Generates a message for a unsolvable method error.- Parameters:
- node- the node where the error occurred
- method- the method name
- args- the method arguments
- Returns:
- the error message
 
- 
operatorErrorGenerates a message for an operator error.- Parameters:
- node- the node where the error occurred
- symbol- the operator name
- Returns:
- the error message
 
- 
propertyError@Deprecated public static String propertyError(org.apache.commons.jexl3.parser.JexlNode node, String var) Deprecated.3.2Generates a message for an unsolvable property error.- Parameters:
- node- the node where the error occurred
- var- the variable
- Returns:
- the error message
 
- 
propertyErrorpublic static String propertyError(org.apache.commons.jexl3.parser.JexlNode node, String pty, boolean undef) Generates a message for an unsolvable property error.- Parameters:
- node- the node where the error occurred
- pty- the property
- undef- whether the property is null or undefined
- Returns:
- the error message
 
- 
sliceSourceRemoves a slice from a source.- Parameters:
- src- the source
- froml- the beginning line
- fromc- the beginning column
- tol- the ending line
- toc- the ending column
- Returns:
- the source with the (begin) to (to) zone removed
 
- 
tryFailedWrap an invocation exception.Return the cause if it is already a JexlException. - Parameters:
- xinvoke- the invocation exception
- Returns:
- a JexlException
 
- 
variableError@Deprecated public static String variableError(org.apache.commons.jexl3.parser.JexlNode node, String variable, boolean undef) Deprecated.3.2Generates a message for a variable error.- Parameters:
- node- the node where the error occurred
- variable- the variable
- undef- whether the variable is null or undefined
- Returns:
- the error message
 
- 
variableErrorpublic static String variableError(org.apache.commons.jexl3.parser.JexlNode node, String variable, JexlException.VariableIssue issue) Generates a message for a variable error.- Parameters:
- node- the node where the error occurred
- variable- the variable
- issue- the variable kind of issue
- Returns:
- the error message
 
- 
cleanCleans a JexlException from any org.apache.commons.jexl3.internal stack trace element.- Returns:
- this exception
 
- 
detailedMessageAccesses detailed message.- Returns:
- the message
 
- 
getDetailGets the exception specific detail- Returns:
- this exception specific detail
- Since:
- 3.2
 
- 
getInfoGets the specific information for this exception.- Returns:
- the information
 
- 
getMessageDetailed info message about this error. Format is "debug![begin,end]: string \n msg" where: - debug is the debugging information if it exists (@link JexlEngine.setDebug) - begin, end are character offsets in the string for the precise location of the error - string is the string representation of the offending expression - msg is the actual explanation message for this error- Overrides:
- getMessagein class- Throwable
- Returns:
- this error as a string
 
- 
infoPleasing checkstyle.- Returns:
- the info
 
- 
parserErrorFormats an error message from the parser.- Parameters:
- prefix- the prefix to the message
- expr- the expression in error
- Returns:
- the formatted message
 
 
-