Class PositionException

  • All Implemented Interfaces:
    java.io.Serializable

    public abstract class PositionException
    extends java.lang.Exception
    An exception that happened at a position in a source file such as a parse error.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      PositionException​(java.lang.String message, java.lang.Throwable cause)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String code()  
      abstract int endCharacter()  
      abstract int endLine()  
      abstract java.nio.file.Path file()  
      java.lang.Throwable fillInStackTrace()  
      abstract java.lang.String longMessage()  
      abstract java.lang.String shortMessage()  
      abstract int startCharacter()  
      abstract int startLine()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, getCause, getLocalizedMessage, getMessage, 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

      • PositionException

        public PositionException​(java.lang.String message,
                                 java.lang.Throwable cause)
    • Method Detail

      • fillInStackTrace

        public java.lang.Throwable fillInStackTrace()
        Overrides:
        fillInStackTrace in class java.lang.Throwable
      • file

        public abstract java.nio.file.Path file()
        Returns:
        The file where the error occurred.
      • code

        public abstract java.lang.String code()
        Returns:
        The text contents of the file being formatted.
      • longMessage

        public abstract java.lang.String longMessage()
        Returns:
        The fully formatted error message including line content and caret.
      • shortMessage

        public abstract java.lang.String shortMessage()
        Returns:
        Only the error message itself without line content and caret.
      • startLine

        public abstract int startLine()
      • startCharacter

        public abstract int startCharacter()
      • endLine

        public abstract int endLine()
      • endCharacter

        public abstract int endCharacter()