Class SightlyCompilerException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.sling.scripting.sightly.compiler.SightlyCompilerException
All Implemented Interfaces:
Serializable

public final class SightlyCompilerException extends RuntimeException
Exception thrown by the SightlyCompiler during various processing operations.
See Also:
  • Constructor Details

    • SightlyCompilerException

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

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

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

      public SightlyCompilerException(String message, 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(String message, 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(String message, Throwable cause)
      Creates an exception with a provided message and cause.
      Parameters:
      message - the exception's message
      cause - the cause
    • SightlyCompilerException

      public SightlyCompilerException(String message, String offendingInput, int line, int column, 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 Details

    • getOffendingInput

      public 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