public class SLExceptionFactory
extends java.lang.Object
This class produces exception with position information. For this, the class can be constructed from antlr3.
Constructor and Description |
---|
SLExceptionFactory(org.antlr.runtime.Parser parser,
java.lang.String fileName,
Position offsetPos) |
SLExceptionFactory(java.lang.String fileName,
int line,
int column,
int index) |
Modifier and Type | Method and Description |
---|---|
void |
addDeprecatedWarning(java.lang.String feature) |
void |
addIgnoreWarning(java.lang.String feature)
This is used for features without semantics such as labels or annotations.
|
void |
addIgnoreWarning(java.lang.String feature,
org.antlr.v4.runtime.Token t) |
void |
addUnderspecifiedWarning(java.lang.String feature)
Used for features with semantics (currently) not supported in KeY/DL.
|
void |
addUnderspecifiedWarning(org.antlr.v4.runtime.Token t) |
void |
addWarning(java.lang.String msg) |
void |
addWarning(java.lang.String msg,
org.antlr.v4.runtime.Token t) |
SLTranslationException |
convertException(org.antlr.runtime.RecognitionException e)
Converts an ANTLRException into an SLTranslationException with the same
message and stack trace, and with current absolute position information.
|
SLTranslationException |
convertException(java.lang.String message,
org.antlr.runtime.RecognitionException e) |
SLTranslationException |
createException(java.lang.String message)
Creates an SLTranslationException with current absolute position
information.
|
SLTranslationException |
createException(java.lang.String message,
java.lang.Throwable cause)
Creates an SLTranslationException with current absolute position
information.
|
SLTranslationException |
createException(java.lang.String message,
org.antlr.runtime.Token t)
Creates an SLTranslationException with the position information of the
passed token.
|
SLTranslationException |
createException(java.lang.String message,
org.antlr.runtime.Token t,
java.lang.Throwable cause)
Creates an SLTranslationException with the position information of the
passed token.
|
java.lang.RuntimeException |
createException0(java.lang.String s) |
java.lang.RuntimeException |
createException0(java.lang.String s,
java.lang.Throwable t) |
java.lang.RuntimeException |
createException0(java.lang.String s,
org.antlr.runtime.Token t) |
java.lang.RuntimeException |
createException0(java.lang.String s,
org.antlr.runtime.Token t,
java.lang.Throwable cause) |
PositionedString |
createPositionedString(java.lang.String text)
Creates a string with the current absolute position information
|
PositionedString |
createPositionedString(java.lang.String text,
Position pos)
Creates a string with position information from the given relative
position.
|
PositionedString |
createPositionedString(java.lang.String text,
org.antlr.runtime.Token t)
Creates a string with the position information of the passed token.
|
PositionedString |
createPositionedString(java.lang.String msg,
org.antlr.v4.runtime.Token t) |
SLTranslationException |
createWarningException(java.lang.String message)
Creates an SLWarningException with current absolute position
information.
|
SLTranslationException |
createWarningException(java.lang.String message,
org.antlr.runtime.Token t) |
java.util.List<PositionedString> |
getWarnings() |
void |
raiseNotSupported(java.lang.String feature) |
SLExceptionFactory |
updatePosition(org.antlr.v4.runtime.ParserRuleContext context) |
SLExceptionFactory |
updatePosition(org.antlr.v4.runtime.Token start) |
public SLExceptionFactory(@Nonnull org.antlr.runtime.Parser parser, java.lang.String fileName, Position offsetPos)
public SLExceptionFactory(java.lang.String fileName, int line, int column, int index)
public SLExceptionFactory updatePosition(org.antlr.v4.runtime.ParserRuleContext context)
public SLExceptionFactory updatePosition(org.antlr.v4.runtime.Token start)
public void addIgnoreWarning(java.lang.String feature)
public void addIgnoreWarning(java.lang.String feature, org.antlr.v4.runtime.Token t)
public void raiseNotSupported(java.lang.String feature)
public void addUnderspecifiedWarning(java.lang.String feature)
public void addUnderspecifiedWarning(org.antlr.v4.runtime.Token t)
public void addDeprecatedWarning(java.lang.String feature)
public void addWarning(java.lang.String msg)
public void addWarning(java.lang.String msg, org.antlr.v4.runtime.Token t)
public java.util.List<PositionedString> getWarnings()
public PositionedString createPositionedString(java.lang.String text, org.antlr.runtime.Token t)
public PositionedString createPositionedString(java.lang.String msg, org.antlr.v4.runtime.Token t)
public PositionedString createPositionedString(java.lang.String text, Position pos)
text
- the String
pos
- the Position
text
as PositionedString
with absolute
position in the current filepublic PositionedString createPositionedString(java.lang.String text)
public SLTranslationException createException(java.lang.String message)
public SLTranslationException createException(java.lang.String message, org.antlr.runtime.Token t)
public SLTranslationException createException(java.lang.String message, java.lang.Throwable cause)
public java.lang.RuntimeException createException0(java.lang.String s)
public java.lang.RuntimeException createException0(java.lang.String s, java.lang.Throwable t)
public java.lang.RuntimeException createException0(java.lang.String s, org.antlr.runtime.Token t)
public java.lang.RuntimeException createException0(java.lang.String s, org.antlr.runtime.Token t, java.lang.Throwable cause)
public SLTranslationException createException(java.lang.String message, org.antlr.runtime.Token t, java.lang.Throwable cause)
cause
- the exception which causes the new exception to be created.public SLTranslationException createWarningException(java.lang.String message)
public SLTranslationException createWarningException(java.lang.String message, org.antlr.runtime.Token t)
public SLTranslationException convertException(org.antlr.runtime.RecognitionException e)
public SLTranslationException convertException(java.lang.String message, org.antlr.runtime.RecognitionException e)
Copyright © 2003-2019 The KeY-Project.