Package com.hubspot.jinjava.interpret
Class TemplateError
- java.lang.Object
-
- com.hubspot.jinjava.interpret.TemplateError
-
public class TemplateError extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TemplateError.ErrorItem
static class
TemplateError.ErrorReason
static class
TemplateError.ErrorType
-
Constructor Summary
-
Method Summary
-
-
-
Constructor Detail
-
TemplateError
public TemplateError(TemplateError.ErrorType severity, TemplateError.ErrorReason reason, TemplateError.ErrorItem item, String message, String fieldName, int lineno, Exception exception)
-
TemplateError
public TemplateError(TemplateError.ErrorType severity, TemplateError.ErrorReason reason, TemplateError.ErrorItem item, String message, String fieldName, int lineno, int startPosition, Exception exception)
-
TemplateError
public TemplateError(TemplateError.ErrorType severity, TemplateError.ErrorReason reason, TemplateError.ErrorItem item, String message, String fieldName, int lineno, int startPosition, Exception exception, TemplateErrorCategory category, Map<String,String> categoryErrors, int scopeDepth)
-
TemplateError
public TemplateError(TemplateError.ErrorType severity, TemplateError.ErrorReason reason, TemplateError.ErrorItem item, String message, String fieldName, int lineno, Exception exception, TemplateErrorCategory category, Map<String,String> categoryErrors)
-
TemplateError
public TemplateError(TemplateError.ErrorType severity, TemplateError.ErrorReason reason, TemplateError.ErrorItem item, String message, String fieldName, int lineno, int startPosition, Exception exception, TemplateErrorCategory category, Map<String,String> categoryErrors)
-
TemplateError
public TemplateError(TemplateError.ErrorType severity, TemplateError.ErrorReason reason, String message, String fieldName, int lineno, int startPosition, Exception exception)
-
-
Method Detail
-
withScopeDepth
public TemplateError withScopeDepth(int scopeDepth)
-
fromSyntaxError
public static TemplateError fromSyntaxError(InterpretException ex)
-
fromException
public static TemplateError fromException(TemplateSyntaxException ex)
-
fromInvalidArgumentException
public static TemplateError fromInvalidArgumentException(InvalidArgumentException ex)
-
fromInvalidInputException
public static TemplateError fromInvalidInputException(InvalidInputException ex)
-
fromMissingFilterArgException
public static TemplateError fromMissingFilterArgException(InvalidArgumentException ex)
-
fromException
public static TemplateError fromException(Exception ex)
-
fromOutputTooBigException
public static TemplateError fromOutputTooBigException(Exception ex)
-
fromException
public static TemplateError fromException(Exception ex, int lineNumber, int startPosition)
-
fromException
public static TemplateError fromException(Exception ex, int lineNumber)
-
fromUnknownProperty
public static TemplateError fromUnknownProperty(Object base, String variable, int lineNumber)
-
fromUnknownProperty
public static TemplateError fromUnknownProperty(Object base, String variable, int lineNumber, int startPosition)
-
getSeverity
public TemplateError.ErrorType getSeverity()
-
getReason
public TemplateError.ErrorReason getReason()
-
getItem
public TemplateError.ErrorItem getItem()
-
getMessage
public String getMessage()
-
setMessage
public void setMessage(String message)
-
getFieldName
public String getFieldName()
-
getLineno
public int getLineno()
-
setLineno
public void setLineno(int lineno)
-
getStartPosition
public int getStartPosition()
-
setStartPosition
public void setStartPosition(int startPosition)
-
getException
public Exception getException()
-
getCategory
public TemplateErrorCategory getCategory()
-
getScopeDepth
public int getScopeDepth()
-
setSourceTemplate
public void setSourceTemplate(String sourceTemplate)
-
serializable
public TemplateError serializable()
-
-