com.google.template.soy.data
Class SoyDataException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.google.template.soy.data.SoyDataException
- All Implemented Interfaces:
- Serializable
public class SoyDataException
- extends RuntimeException
Exception thrown when an error occurs in the data package.
- See Also:
- Serialized Form
SoyDataException
public SoyDataException(String message)
- Parameters:
message - A detailed description of the error.
SoyDataException
public SoyDataException(String dataPath,
String message)
- Parameters:
dataPath - The data path where the error occurred.message - A detailed description of the error.
SoyDataException
public SoyDataException(String message,
Throwable cause)
- Parameters:
message - A detailed description of the error.cause - The throwable that is causing this exception.
SoyDataException
public SoyDataException(String dataPath,
String message,
Throwable cause)
- Parameters:
dataPath - The data path where the error occurred.message - A detailed description of the error.cause - The throwable that is causing this exception.
prependKeyToDataPath
public void prependKeyToDataPath(String key)
- Prepends a key to the data path where this error occurred.
E.g. if the dataPath was previously 'foo.goo' and the key to prepend is 'boo', then the new
data path will be 'boo.foo.goo'.
- Parameters:
key - The key to prepend.
prependIndexToDataPath
public void prependIndexToDataPath(int index)
- Prepends an index to the data path where this error occurred.
E.g. if the dataPath was previously 'foo.goo' and the index to prepend is 2, then the new
data path will be '[2].foo.goo'.
- Parameters:
index - The index to prepend.
getMessage
public String getMessage()
- Overrides:
getMessage in class Throwable