Package org.springframework.expression
Class ExpressionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.expression.ExpressionException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EvaluationException
,ParseException
Super class for exceptions that can occur whilst processing expressions.
- Since:
- 3.0
- Author:
- Andy Clement, Phillip Webb
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionExpressionException
(int position, String message) Construct a new expression exception.ExpressionException
(int position, String message, Throwable cause) Construct a new expression exception.ExpressionException
(String message) Construct a new expression exception.ExpressionException
(String expressionString, int position, String message) Construct a new expression exception.ExpressionException
(String expressionString, String message) Construct a new expression exception.ExpressionException
(String message, Throwable cause) Construct a new expression exception. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Return the expression string.Return the exception message.final int
Return the position in the expression string where the problem occurred.Return the exception simple message without including the expression that caused the failure.Return a detailed description of this exception, including the expression String and position (if available) as well as the actual exception message.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
expressionString
-
position
protected int position
-
-
Constructor Details
-
ExpressionException
Construct a new expression exception.- Parameters:
message
- a descriptive message
-
ExpressionException
Construct a new expression exception.- Parameters:
message
- a descriptive messagecause
- the underlying cause of this exception
-
ExpressionException
Construct a new expression exception.- Parameters:
expressionString
- the expression stringmessage
- a descriptive message
-
ExpressionException
Construct a new expression exception.- Parameters:
expressionString
- the expression stringposition
- the position in the expression string where the problem occurredmessage
- a descriptive message
-
ExpressionException
Construct a new expression exception.- Parameters:
position
- the position in the expression string where the problem occurredmessage
- a descriptive message
-
ExpressionException
Construct a new expression exception.- Parameters:
position
- the position in the expression string where the problem occurredmessage
- a descriptive messagecause
- the underlying cause of this exception
-
-
Method Details
-
getExpressionString
Return the expression string. -
getPosition
public final int getPosition()Return the position in the expression string where the problem occurred. -
getMessage
Return the exception message. As of Spring 4.0, this method returns the same result astoDetailedString()
.- Overrides:
getMessage
in classThrowable
- See Also:
-
toDetailedString
Return a detailed description of this exception, including the expression String and position (if available) as well as the actual exception message. -
getSimpleMessage
Return the exception simple message without including the expression that caused the failure.- Since:
- 4.0
-