Class OgnlException
java.lang.Object
java.lang.Throwable
java.lang.Exception
ognl.OgnlException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ExpressionSyntaxException, InappropriateExpressionException, MethodFailedException, NoSuchPropertyException
Superclass for OGNL exceptions, incorporating an optional encapsulated exception.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate EvaluationThe root evaluation of the expression when the exception was thrownprivate static final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs an OgnlException with no message or encapsulated exception.OgnlException(String msg) Constructs an OgnlException with the given message but no encapsulated exception.OgnlException(String msg, Throwable reason) Constructs an OgnlException with the given message and encapsulated exception.protectedOgnlException(String message, Throwable reason, boolean enableSuppression, boolean writableStackTrace) Constructs an OgnlException with the given message and encapsulated exception, with control on exception suppression and stack trace collection. -
Method Summary
Modifier and TypeMethodDescriptionReturns the Evaluation that was the root evaluation when the exception was thrown.Returns the encapsulated exception, or null if there is none.voidsetEvaluation(Evaluation value) Sets the Evaluation that was current when this exception was thrown.toString()Returns a string representation of this exception.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
_evaluation
The root evaluation of the expression when the exception was thrown
-
-
Constructor Details
-
OgnlException
public OgnlException()Constructs an OgnlException with no message or encapsulated exception. -
OgnlException
Constructs an OgnlException with the given message but no encapsulated exception.- Parameters:
msg- the exception's detail message
-
OgnlException
-
OgnlException
protected OgnlException(String message, Throwable reason, boolean enableSuppression, boolean writableStackTrace) Constructs an OgnlException with the given message and encapsulated exception, with control on exception suppression and stack trace collection.- Parameters:
message- the exception's detail messagereason- the encapsulated exceptionenableSuppression- whether suppression is enabled or disabledwritableStackTrace- whether the stack trace should be writable SeeThrowable(String, Throwable, boolean, boolean)for more info.
-
-
Method Details
-
getReason
Returns the encapsulated exception, or null if there is none.- Returns:
- the encapsulated exception
-
getEvaluation
Returns the Evaluation that was the root evaluation when the exception was thrown.- Returns:
- The
Evaluation.
-
setEvaluation
Sets the Evaluation that was current when this exception was thrown.- Parameters:
value- TheEvaluation.
-
toString
-