public class LegacyInternalSyntaxException extends SoySyntaxException
Errors should generally be reported via the ErrorReporter rather than these exceptions.
| Modifier and Type | Field and Description |
|---|---|
protected SourceLocation |
srcLoc
The location in the soy file at which the error occurred.
|
protected String |
templateName
The name of the template with the syntax error if any.
|
| Modifier | Constructor and Description |
|---|---|
protected |
LegacyInternalSyntaxException(String message) |
protected |
LegacyInternalSyntaxException(String message,
Throwable cause) |
protected |
LegacyInternalSyntaxException(Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
LegacyInternalSyntaxException |
associateMetaInfo(SourceLocation srcLoc,
String filePath,
String templateName) |
static LegacyInternalSyntaxException |
createWithMetaInfo(String message,
SourceLocation srcLoc)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
static LegacyInternalSyntaxException |
createWithMetaInfo(String message,
SourceLocation srcLoc,
String filePath,
String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
static LegacyInternalSyntaxException |
createWithoutMetaInfo(String message)
Deprecated.
Prefer
createWithMetaInfo(java.lang.String, com.google.template.soy.base.SourceLocation, java.lang.String, java.lang.String). There's no good
reason for not knowing where an error comes from. |
String |
getMessage() |
String |
getOriginalMessage()
Returns the original exception message, without any source location formatting.
|
SourceLocation |
getSourceLocation()
The source location at which the error occurred or
SourceLocation.UNKNOWN. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected SourceLocation srcLoc
protected String templateName
protected LegacyInternalSyntaxException(Throwable cause)
protected LegacyInternalSyntaxException(String message, Throwable cause)
protected LegacyInternalSyntaxException(String message)
@Deprecated public static LegacyInternalSyntaxException createWithoutMetaInfo(String message)
createWithMetaInfo(java.lang.String, com.google.template.soy.base.SourceLocation, java.lang.String, java.lang.String). There's no good
reason for not knowing where an error comes from.Important: Do not use outside of Soy code (treat as superpackage-private).
message - The error message.public static LegacyInternalSyntaxException createWithMetaInfo(String message, @Nullable SourceLocation srcLoc, @Nullable String filePath, @Nullable String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private).
message - The error message.srcLoc - The source location of the error, or null if unknown. At most one of srcLoc and
filePath may be nonnull (prefer srcLoc since it contains more info).filePath - The file path of the file containing the error. At most one of srcLoc and
filePath may be nonnull (prefer srcLoc since it contains more info).templateName - The name of the template containing the error, or null if not available.public static LegacyInternalSyntaxException createWithMetaInfo(String message, SourceLocation srcLoc)
Important: Do not use outside of Soy code (treat as superpackage-private).
message - The error message.srcLoc - The source location of the error, or null if unknown.public LegacyInternalSyntaxException associateMetaInfo(@Nullable SourceLocation srcLoc, @Nullable String filePath, @Nullable String templateName)
public SourceLocation getSourceLocation()
SourceLocation.UNKNOWN.public String getOriginalMessage()
public String getMessage()
getMessage in class Throwable