com.google.template.soy.tofu
Class SoyTofuException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.google.template.soy.tofu.SoyTofuException
All Implemented Interfaces:
Serializable

public class SoyTofuException
extends RuntimeException

Exception thrown when an error occurs during template rendering.

See Also:
Serialized Form

Constructor Summary
SoyTofuException(com.google.template.soy.sharedpasses.render.RenderException re)
          Creates an instance by copying a RenderException.
SoyTofuException(String message)
           
SoyTofuException(String message, Throwable cause)
           
 
Method Summary
 String getMessage()
           
 String getTemplateName()
          The name of the template in which the problem occurred or null if not known.
 SoyTofuException setTemplateName(String templateName)
          Sets the template name for this error.
 
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
 

Constructor Detail

SoyTofuException

public SoyTofuException(String message)
Parameters:
message - A detailed description of the error.

SoyTofuException

public SoyTofuException(String message,
                        Throwable cause)
Parameters:
message - A detailed description of the error.
cause - The underlying error.

SoyTofuException

public SoyTofuException(com.google.template.soy.sharedpasses.render.RenderException re)
Creates an instance by copying a RenderException.

Parameters:
re - The RenderException to copy.
Method Detail

getTemplateName

@Nullable
public String getTemplateName()
The name of the template in which the problem occurred or null if not known.


setTemplateName

public SoyTofuException setTemplateName(String templateName)
Sets the template name for this error.

Parameters:
templateName - The name of the template containing this error.
Returns:
This same instance.

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable