|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.google.template.soy.base.SoySyntaxException
public class SoySyntaxException
Exception for Soy syntax errors.
Important: Users outside of Soy code may call the getters on a SoySyntaxException object created by the Soy compiler, but should not create or mutate SoySyntaxException objects themselves (treat constructors, creation functions, and mutating methods as superpackage-private).
| Constructor Summary | |
|---|---|
|
SoySyntaxException(String message)
Deprecated. Do not use outside of Soy code (treat as superpackage-private). |
protected |
SoySyntaxException(String message,
Throwable cause)
Important: Do not use outside of Soy code (treat as superpackage-private). |
protected |
SoySyntaxException(Throwable cause)
Important: Do not use outside of Soy code (treat as superpackage-private). |
| Method Summary | |
|---|---|
SoySyntaxException |
associateMetaInfo(com.google.template.soy.base.SourceLocation srcLoc,
String filePath,
String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private). |
static SoySyntaxException |
createCausedWithMetaInfo(String message,
Throwable cause,
com.google.template.soy.base.SourceLocation srcLoc,
String filePath,
String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private). |
static SoySyntaxException |
createCausedWithoutMetaInfo(String message,
Throwable cause)
Important: Do not use outside of Soy code (treat as superpackage-private). |
static SoySyntaxException |
createWithMetaInfo(String message,
com.google.template.soy.base.SourceLocation srcLoc,
String filePath,
String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private). |
static SoySyntaxException |
createWithoutMetaInfo(String message)
Important: Do not use outside of Soy code (treat as superpackage-private). |
String |
getMessage()
|
String |
getOriginalMessage()
|
com.google.template.soy.base.SourceLocation |
getSourceLocation()
The source location at which the error occurred or SourceLocation.UNKNOWN. |
String |
getTemplateName()
The name of the template in which the problem occurred or null if not known. |
| 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 |
|---|
@Deprecated public SoySyntaxException(String message)
Important: Do not use outside of Soy code (treat as superpackage-private).
message - A detailed description of what the syntax error is.
protected SoySyntaxException(String message,
Throwable cause)
Important: Do not use outside of Soy code (treat as superpackage-private).
message - A detailed description of what the syntax error is.cause - The Throwable underlying this syntax error.protected SoySyntaxException(Throwable cause)
Important: Do not use outside of Soy code (treat as superpackage-private).
Note: For this constructor, the message will be set to the cause's message.
cause - The Throwable underlying this syntax error.| Method Detail |
|---|
public static SoySyntaxException createWithoutMetaInfo(String message)
Important: Do not use outside of Soy code (treat as superpackage-private).
message - The error message.
public static SoySyntaxException createCausedWithoutMetaInfo(@Nullable
String message,
Throwable cause)
Important: Do not use outside of Soy code (treat as superpackage-private).
message - The error message, or null to use the message from the cause.cause - The cause of this exception.
public static SoySyntaxException createWithMetaInfo(String message,
@Nullable
com.google.template.soy.base.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 SoySyntaxException createCausedWithMetaInfo(@Nullable
String message,
Throwable cause,
@Nullable
com.google.template.soy.base.SourceLocation srcLoc,
@Nullable
String filePath,
@Nullable
String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private).
message - The error message, or null to use the message from the cause.cause - The cause of this exception.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 SoySyntaxException associateMetaInfo(@Nullable
com.google.template.soy.base.SourceLocation srcLoc,
@Nullable
String filePath,
@Nullable
String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private).
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 com.google.template.soy.base.SourceLocation getSourceLocation()
SourceLocation.UNKNOWN.
@Nullable public String getTemplateName()
null if not known.
public String getMessage()
getMessage in class Throwablepublic String getOriginalMessage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||