Class SemanticException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class SemanticException
    extends org.antlr.runtime.RecognitionException
    The SemanticException 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 from RuntimeException must be thrown.

    The SemanticException exception is inherited from the RecognitionException ANTLR exception to allow handling them in the same way.

    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.antlr.runtime.RecognitionException

        approximateLineInfo, c, charPositionInLine, index, input, line, node, token
    • 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
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable
      • getWhere

        public Where getWhere()