Package org.apache.sling.scripting.sightly.compiler

## 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:
  Serialized Form

### Constructor Summary

Constructors
`SightlyCompilerException()` Create a simple exception without any other information.
`SightlyCompilerException​(String message)` Create an exception with a provided message.
`SightlyCompilerException​(String message, String offendingInput)` Create an exception that has information about offending syntax input.
`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.
`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.
`SightlyCompilerException​(String message, Throwable cause)` Creates an exception with a provided message and cause.
`SightlyCompilerException​(Throwable cause)` Create an exception with information about the cause.

### Method Summary

All Methods Instance Methods Concrete Methods
`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.
`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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### 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 Detail

#### 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