Top Description Fields Constructors Methods
org.springframework.expression

public Class ExpressionException

extends RuntimeException
Class Inheritance
Known Direct Subclasses
org.springframework.expression.ParseException, org.springframework.expression.EvaluationException
Annotations
@SuppressWarnings:serial
Imports
org.springframework.lang.Nullable

Superclass for exceptions that can occur whilst processing expressions.
Authors
Andy Clement, Phillip Webb
Since
3.0

Field Summary

Modifier and TypeField and Description
protected final String
protected int

Constructor Summary

AccessConstructor and Description
public
ExpressionException(String
a descriptive message
message
)

Construct a new expression exception.

public
ExpressionException(String
a descriptive message
message
,
Throwable
the underlying cause of this exception
cause
)

Construct a new expression exception.

public
ExpressionException(String
the expression string
expressionString
,
String
a descriptive message
message
)

Construct a new expression exception.

public
ExpressionException(String
the expression string
expressionString
,
int
the position in the expression string where the problem occurred
position
,
String
a descriptive message
message
)

Construct a new expression exception.

public
ExpressionException(int
the position in the expression string where the problem occurred
position
,
String
a descriptive message
message
)

Construct a new expression exception.

public
ExpressionException(int
the position in the expression string where the problem occurred
position
,
String
a descriptive message
message
,
Throwable
the underlying cause of this exception
cause
)

Construct a new expression exception.

Method Summary

Modifier and TypeMethod and Description
public final String
getExpressionString()

Return the expression string.

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Return the exception message.

public final int
getPosition()

Return the position in the expression string where the problem occurred.

public String
getSimpleMessage()

Return the exception simple message without including the expression that caused the failure.

public String
toDetailedString()

Return a detailed description of this exception, including the expression String and position (if available) as well as the actual exception message.

Field Detail

expressionStringback to summary
protected final String expressionString
Annotations
@Nullable
positionback to summary
protected int position

Constructor Detail

ExpressionExceptionback to summary
public ExpressionException(String message)

Construct a new expression exception.

Parameters
message:String

a descriptive message

ExpressionExceptionback to summary
public ExpressionException(String message, Throwable cause)

Construct a new expression exception.

Parameters
message:String

a descriptive message

cause:Throwable

the underlying cause of this exception

ExpressionExceptionback to summary
public ExpressionException(String expressionString, String message)

Construct a new expression exception.

Parameters
expressionString:String

the expression string

message:String

a descriptive message

ExpressionExceptionback to summary
public ExpressionException(String expressionString, int position, String message)

Construct a new expression exception.

Parameters
expressionString:String

the expression string

position:int

the position in the expression string where the problem occurred

message:String

a descriptive message

ExpressionExceptionback to summary
public ExpressionException(int position, String message)

Construct a new expression exception.

Parameters
position:int

the position in the expression string where the problem occurred

message:String

a descriptive message

ExpressionExceptionback to summary
public ExpressionException(int position, String message, Throwable cause)

Construct a new expression exception.

Parameters
position:int

the position in the expression string where the problem occurred

message:String

a descriptive message

cause:Throwable

the underlying cause of this exception

Method Detail

getExpressionStringback to summary
public final String getExpressionString()

Return the expression string.

Annotations
@Nullable
getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Return the exception message. As of Spring 4.0, this method returns the same result as toDetailedString().

Returns:String

Doc from java.lang.Throwable.getMessage.

the detail message string of this Throwable instance (which may be null).

Annotations
@Override
See Also
getSimpleMessage(), java.lang.Throwable#getMessage()
getPositionback to summary
public final int getPosition()

Return the position in the expression string where the problem occurred.

getSimpleMessageback to summary
public String getSimpleMessage()

Return the exception simple message without including the expression that caused the failure.

Since
4.0
toDetailedStringback to summary
public String toDetailedString()

Return a detailed description of this exception, including the expression String and position (if available) as well as the actual exception message.