Class SightlyCompilerException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class SightlyCompilerException
    extends java.lang.RuntimeException
    Exception thrown by the SightlyCompiler during various processing operations.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SightlyCompilerException()
      Create a simple exception without any other information.
      SightlyCompilerException​(java.lang.String message)
      Create an exception with a provided message.
      SightlyCompilerException​(java.lang.String message, java.lang.String offendingInput)
      Create an exception that has information about offending syntax input.
      SightlyCompilerException​(java.lang.String message, java.lang.String offendingInput, int line, int column)
      Creates an exception that has information about offending syntax input, with additional details about the position of the error.
      SightlyCompilerException​(java.lang.String message, java.lang.String offendingInput, int line, int column, java.lang.Throwable cause)
      Creates an exception that has information about offending syntax input, with additional details about the position of the error.
      SightlyCompilerException​(java.lang.String message, java.lang.Throwable cause)
      Creates an exception with a provided message and cause.
      SightlyCompilerException​(java.lang.Throwable cause)
      Create an exception with information about the cause.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumn()
      Returns the column in the line where the error occurred, if the information is available.
      int getLine()
      Returns the line where the error occurred, if the information is available.
      java.lang.String getOffendingInput()
      Returns the offending input, as a raw string.
      • Methods inherited from class java.lang.Throwable

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

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SightlyCompilerException

        public SightlyCompilerException()
        Create a simple exception without any other information.
      • SightlyCompilerException

        public SightlyCompilerException​(java.lang.String message)
        Create an exception with a provided message.
        Parameters:
        message - the exception's message
      • SightlyCompilerException

        public SightlyCompilerException​(java.lang.Throwable cause)
        Create an exception with information about the cause.
        Parameters:
        cause - the cause
      • SightlyCompilerException

        public SightlyCompilerException​(java.lang.String message,
                                        java.lang.String offendingInput)
        Create an exception that has information about offending syntax input.
        Parameters:
        message - the exception's message
        offendingInput - the offending input, as raw text
      • SightlyCompilerException

        public SightlyCompilerException​(java.lang.String message,
                                        java.lang.String offendingInput,
                                        int line,
                                        int column)
        Creates an exception that has information about offending syntax input, with additional details about the position of the error.
        Parameters:
        message - the exception's message
        offendingInput - the offending input, as raw text
        line - the line where the error occurred
        column - the column in the line where the error occurred
      • SightlyCompilerException

        public SightlyCompilerException​(java.lang.String message,
                                        java.lang.Throwable cause)
        Creates an exception with a provided message and cause.
        Parameters:
        message - the exception's message
        cause - the cause
      • SightlyCompilerException

        public SightlyCompilerException​(java.lang.String message,
                                        java.lang.String offendingInput,
                                        int line,
                                        int column,
                                        java.lang.Throwable cause)
        Creates an exception that has information about offending syntax input, with additional details about the position of the error.
        Parameters:
        message - the exception's message
        offendingInput - the offending input, as raw text
        line - the line where the error occurred
        column - the column in the line where the error occurred
        cause - the cause
    • Method Detail

      • getOffendingInput

        public java.lang.String getOffendingInput()
        Returns the offending input, as a raw string.
        Returns:
        the offending input, as a raw string
      • getLine

        public int getLine()
        Returns the line where the error occurred, if the information is available.
        Returns:
        the line where the error occurred, if the information is available
      • getColumn

        public int getColumn()
        Returns the column in the line where the error occurred, if the information is available.
        Returns:
        the column in the line where the error occurred, if the information is available