Module jamal.api

Class BadSyntaxAt

  • All Implemented Interfaces:
    java.io.Serializable

    public class BadSyntaxAt
    extends BadSyntax
    This exception, as the name suggest, is thrown when the processor or a macro finds something it cannot interpret. The 'At' at the end of the name suggest that the exception contains a Position object that tells exactly which source file is the culprit and which line and character position is the place where the macro processor lost it's faith in you being able to craft syntactically correct macros.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage()  
      Position getPosition()  
      • 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
    • Constructor Detail

      • BadSyntaxAt

        public BadSyntaxAt()
      • BadSyntaxAt

        public BadSyntaxAt​(BadSyntax bs,
                           Position pos)
        Convert a BadSyntax exception thrown from a macro that has no idea where the actual source code is to a BadSyntaxAt exception using the provided reference.

        The new exception will inherit the message, the cause, the suppressed throwables and the stack trace of the original exception.

        Parameters:
        bs - the original exception that was caught and is to be transformed to this exception
        pos - the position object denoting where the syntax error was actually detected
      • BadSyntaxAt

        public BadSyntaxAt​(java.lang.String message,
                           Position pos)
      • BadSyntaxAt

        public BadSyntaxAt​(java.lang.String message,
                           Position pos,
                           java.lang.Throwable cause)
    • Method Detail

      • getPosition

        public Position getPosition()