类 ExpressionException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.expression.ExpressionException
- 所有已实现的接口:
Serializable
- 直接已知子类:
EvaluationException
,ParseException
public class ExpressionException extends RuntimeException
Super class for exceptions that can occur whilst processing expressions.- 从以下版本开始:
- 3.0
- 作者:
- Andy Clement, Phillip Webb
- 另请参阅:
- 序列化表格
字段概要
字段 修饰符和类型 字段 说明 protected String
expressionString
protected int
position
构造器概要
构造器 构造器 说明 ExpressionException(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.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getExpressionString()
Return the expression string.String
getMessage()
Return the exception message.int
getPosition()
Return the position in the expression string where the problem occurred.String
getSimpleMessage()
Return the exception simple message without including the expression that caused the failure.String
toDetailedString()
Return a detailed description of this exception, including the expression String and position (if available) as well as the actual exception message.
字段详细资料
expressionString
@Nullable protected final String expressionString
position
protected int position
构造器详细资料
ExpressionException
public ExpressionException(String message)
Construct a new expression exception.- 参数:
message
- a descriptive message
ExpressionException
public ExpressionException(String message, Throwable cause)
Construct a new expression exception.- 参数:
message
- a descriptive messagecause
- the underlying cause of this exception
ExpressionException
public ExpressionException(@Nullable String expressionString, String message)
Construct a new expression exception.- 参数:
expressionString
- the expression stringmessage
- a descriptive message
ExpressionException
public ExpressionException(@Nullable String expressionString, int position, String message)
Construct a new expression exception.- 参数:
expressionString
- the expression stringposition
- the position in the expression string where the problem occurredmessage
- a descriptive message
ExpressionException
public ExpressionException(int position, String message)
Construct a new expression exception.- 参数:
position
- the position in the expression string where the problem occurredmessage
- a descriptive message
ExpressionException
public ExpressionException(int position, String message, Throwable cause)
Construct a new expression exception.- 参数:
position
- the position in the expression string where the problem occurredmessage
- a descriptive messagecause
- the underlying cause of this exception
方法详细资料
getExpressionString
@Nullable public final String getExpressionString()
Return the expression string.
getPosition
public final int getPosition()
Return the position in the expression string where the problem occurred.
getMessage
public String getMessage()
Return the exception message. As of Spring 4.0, this method returns the same result astoDetailedString()
.- 覆盖:
getMessage
在类中Throwable
- 另请参阅:
getSimpleMessage()
,Throwable.getMessage()
toDetailedString
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.
getSimpleMessage
public String getSimpleMessage()
Return the exception simple message without including the expression that caused the failure.- 从以下版本开始:
- 4.0