Class SightlyCompilerException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.sling.scripting.sightly.compiler.SightlyCompilerException
-
- All Implemented Interfaces:
java.io.Serializable
public final class SightlyCompilerException extends java.lang.RuntimeException
Exception thrown by theSightlyCompiler
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.
-
-
-
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 messageoffendingInput
- 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 messageoffendingInput
- the offending input, as raw textline
- the line where the error occurredcolumn
- 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 messagecause
- 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 messageoffendingInput
- the offending input, as raw textline
- the line where the error occurredcolumn
- the column in the line where the error occurredcause
- 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
-
-