org.webmacro
Class PropertyException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.webmacro.RethrowableException
              extended byorg.webmacro.WebMacroException
                  extended byorg.webmacro.ContextException
                      extended byorg.webmacro.PropertyException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
InvalidContextException, PropertyException.InvalidTypeException, PropertyException.NoSuchMethodException, PropertyException.NoSuchMethodWithArgumentsException, PropertyException.NoSuchPropertyException, PropertyException.NoSuchVariableException, PropertyException.NullToStringException, PropertyException.NullValueException, PropertyException.RestrictedMethodException, PropertyException.RestrictedPropertyException, PropertyException.UndefinedVariableException, PropertyException.VoidValueException

public class PropertyException
extends ContextException

A PropertyException indicates some failure to evaluate a property in a context or against some other object. For example, if you attempted to introspect for a value that does not exist, or access a non-existant value in a context, or access a protected or private field.

PropertyExceptions that make their way through one of the core EvaluationExceptionHandlers have their context location set (line and column numbers from template).

Version:
27-07-2002
Author:
Marcel Huijkman
See Also:
Serialized Form

Nested Class Summary
static class PropertyException.InvalidTypeException
          Exception thrown when a Variable isn't of the specified class type.
static class PropertyException.NoSuchMethodException
          NoSuchMethodException indicates that the variable did not have the requested method.
static class PropertyException.NoSuchMethodWithArgumentsException
          NoSuchMethodWithArgumentsException indicates that the variable did not have the a method with the request name and argument list
static class PropertyException.NoSuchPropertyException
          NoSuchPropertyException indicates that the variable did not have the requested property.
static class PropertyException.NoSuchVariableException
          NoSuchVariableException indicates that a variable did not exist in the context against which it was being evaluated.
static class PropertyException.NullToStringException
          NullStringException indicates that a variable exists but its .toString() method returns null
static class PropertyException.NullValueException
          NullValueException indicates that a variable or property exists, but evaluated to null in the context against which it was being evaluated.
static class PropertyException.RestrictedMethodException
          RestrictedMethodException indicates that the requested method may not be invoked from a template due to security constraints
static class PropertyException.RestrictedPropertyException
          RestrictedPropertyException indicates that the requested property may not be invoked from a template due to security constraints
static class PropertyException.UndefinedVariableException
          UndefinedVariableException indicates that the variable did not have the requested method.
static class PropertyException.VoidValueException
          VoidValueException indicates that someone tried to use the return value of a void method
 
Constructor Summary
PropertyException(java.lang.String reason)
           
PropertyException(java.lang.String reason, java.lang.Throwable e)
           
PropertyException(java.lang.String reason, java.lang.Throwable e, java.lang.String contextLocation)
           
 
Method Summary
 java.lang.String getMessage()
          Overloaded to return the reason specified during construction plus the context location, if any.
 void setMessage(java.lang.String message)
           
 
Methods inherited from class org.webmacro.WebMacroException
getContextLocation, setContextLocation
 
Methods inherited from class org.webmacro.RethrowableException
getCaught, getCause, getRootCause, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyException

public PropertyException(java.lang.String reason)

PropertyException

public PropertyException(java.lang.String reason,
                         java.lang.Throwable e)

PropertyException

public PropertyException(java.lang.String reason,
                         java.lang.Throwable e,
                         java.lang.String contextLocation)
Method Detail

setMessage

public void setMessage(java.lang.String message)

getMessage

public java.lang.String getMessage()
Description copied from class: WebMacroException
Overloaded to return the reason specified during construction plus the context location, if any.

Overrides:
getMessage in class WebMacroException