org.springframework.expression.spel
Class SpelEvaluationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.expression.ExpressionException
                  extended by org.springframework.expression.EvaluationException
                      extended by org.springframework.expression.spel.SpelEvaluationException
All Implemented Interfaces:
java.io.Serializable

public class SpelEvaluationException
extends EvaluationException

Root exception for Spring EL related exceptions. Rather than holding a hard coded string indicating the problem, it records a message key and the inserts for the message. See SpelMessage for the list of all possible messages that can occur.

Since:
3.0
Author:
Andy Clement
See Also:
Serialized Form

Field Summary
private  java.lang.Object[] inserts
           
private  SpelMessage message
           
 
Fields inherited from class org.springframework.expression.ExpressionException
expressionString, position
 
Constructor Summary
SpelEvaluationException(int position, SpelMessage message, java.lang.Object... inserts)
           
SpelEvaluationException(int position, java.lang.Throwable cause, SpelMessage message, java.lang.Object... inserts)
           
SpelEvaluationException(SpelMessage message, java.lang.Object... inserts)
           
SpelEvaluationException(java.lang.Throwable cause, SpelMessage message, java.lang.Object... inserts)
           
 
Method Summary
 java.lang.Object[] getInserts()
           
 java.lang.String getMessage()
           
 SpelMessage getMessageCode()
           
 void setPosition(int position)
          Set the position in the related expression which gave rise to this exception.
 
Methods inherited from class org.springframework.expression.ExpressionException
getExpressionString, getPosition, toDetailedString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

message

private SpelMessage message

inserts

private java.lang.Object[] inserts
Constructor Detail

SpelEvaluationException

public SpelEvaluationException(SpelMessage message,
                               java.lang.Object... inserts)

SpelEvaluationException

public SpelEvaluationException(int position,
                               SpelMessage message,
                               java.lang.Object... inserts)

SpelEvaluationException

public SpelEvaluationException(int position,
                               java.lang.Throwable cause,
                               SpelMessage message,
                               java.lang.Object... inserts)

SpelEvaluationException

public SpelEvaluationException(java.lang.Throwable cause,
                               SpelMessage message,
                               java.lang.Object... inserts)
Method Detail

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable
Returns:
a formatted message with inserts applied

getMessageCode

public SpelMessage getMessageCode()
Returns:
the message code

setPosition

public void setPosition(int position)
Set the position in the related expression which gave rise to this exception.

Parameters:
position - the position in the expression that gave rise to the exception

getInserts

public java.lang.Object[] getInserts()
Returns:
the message inserts