Package ognl
Class OgnlException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- ognl.OgnlException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ExpressionSyntaxException,InappropriateExpressionException,MethodFailedException,NoSuchPropertyException
public class OgnlException extends java.lang.ExceptionSuperclass for OGNL exceptions, incorporating an optional encapsulated exception.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Evaluation_evaluationThe root evaluation of the expression when the exception was thrownprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description OgnlException()Constructs an OgnlException with no message or encapsulated exception.OgnlException(java.lang.String msg)Constructs an OgnlException with the given message but no encapsulated exception.OgnlException(java.lang.String msg, java.lang.Throwable reason)Constructs an OgnlException with the given message and encapsulated exception.protectedOgnlException(java.lang.String message, java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationgetEvaluation()Returns the Evaluation that was the root evaluation when the exception was thrown.java.lang.ThrowablegetReason()Returns the encapsulated exception, or null if there is none.voidsetEvaluation(Evaluation value)Sets the Evaluation that was current when this exception was thrown.java.lang.StringtoString()Returns a string representation of this exception.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
_evaluation
private Evaluation _evaluation
The root evaluation of the expression when the exception was thrown
-
-
Constructor Detail
-
OgnlException
public OgnlException()
Constructs an OgnlException with no message or encapsulated exception.
-
OgnlException
public OgnlException(java.lang.String msg)
Constructs an OgnlException with the given message but no encapsulated exception.- Parameters:
msg- the exception's detail message
-
OgnlException
public OgnlException(java.lang.String msg, java.lang.Throwable reason)Constructs an OgnlException with the given message and encapsulated exception.- Parameters:
msg- the exception's detail messagereason- the encapsulated exception
-
OgnlException
protected OgnlException(java.lang.String message, java.lang.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 Detail
-
getReason
public java.lang.Throwable getReason()
Returns the encapsulated exception, or null if there is none.- Returns:
- the encapsulated exception
-
getEvaluation
public Evaluation getEvaluation()
Returns the Evaluation that was the root evaluation when the exception was thrown.- Returns:
- The
Evaluation.
-
setEvaluation
public void setEvaluation(Evaluation value)
Sets the Evaluation that was current when this exception was thrown.- Parameters:
value- TheEvaluation.
-
toString
public java.lang.String toString()
Returns a string representation of this exception.- Overrides:
toStringin classjava.lang.Throwable- Returns:
- a string representation of this exception
-
-