Class SemanticException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.antlr.runtime.RecognitionException
-
- ru.ispras.microtesk.translator.antlrex.SemanticException
-
- All Implemented Interfaces:
java.io.Serializable
public final class SemanticException extends org.antlr.runtime.RecognitionException
TheSemanticException
exception is thrown by the translator (lexer, parser, tree walker or other its parts) if it detects a semantic error in the translated specification.All semantic errors found in the specification must be reported as
SemanticException
. In situations when an error is caused by issues in code (coding mistakes, invariant violations, limitations) an unchecked exception inherited fromRuntimeException
must be thrown.The
SemanticException
exception is inherited from theRecognitionException
ANTLR exception to allow handling them in the same way.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISemanticError
getError()
java.lang.String
getMessage()
Where
getWhere()
-
Methods inherited from class org.antlr.runtime.RecognitionException
extractInformationFromTreeNodeStream, getUnexpectedType
-
-
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
-
getError
public ISemanticError getError()
-
getWhere
public Where getWhere()
-
-