org.webmacro
Class WebMacroException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.webmacro.RethrowableException
              extended byorg.webmacro.WebMacroException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConfigException, ContextException, HandlerException, InitException, IntrospectionException, InvalidTypeException, LogTargetFactory.LogCreationException, ResourceException, TemplateException

public class WebMacroException
extends RethrowableException

This is the base class of all WebMacro exceptions. You could use it to catch any exception enerated by WebMacro code.

See Also:
Serialized Form

Constructor Summary
WebMacroException()
           
WebMacroException(java.lang.String reason)
           
WebMacroException(java.lang.String reason, java.lang.Throwable e)
           
 
Method Summary
 java.lang.String getContextLocation()
           
 java.lang.String getMessage()
          Overloaded to return the reason specified during construction plus the context location, if any.
 void setContextLocation(java.lang.String location)
          Record the line and column info from the template that caused this ProeprtyException to be thrown.
 
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

WebMacroException

public WebMacroException()

WebMacroException

public WebMacroException(java.lang.String reason)

WebMacroException

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

getMessage

public java.lang.String getMessage()
Overloaded to return the reason specified during construction plus the context location, if any.


setContextLocation

public void setContextLocation(java.lang.String location)
Record the line and column info from the template that caused this ProeprtyException to be thrown.


getContextLocation

public java.lang.String getContextLocation()
Returns:
location (line/column) from the template that caused this PropertyException to be thrown. Can be null if this exception instance wasn't previously handled by a core EvaluationExceptionHandler.