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
Exception thrown by the
SightlyCompiler
during various processing operations.- See Also:
-
Constructor Summary
ConstructorDescriptionCreate 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.Create an exception with information about the cause. -
Method Summary
Modifier and TypeMethodDescriptionint
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.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
-
Constructor Details
-
SightlyCompilerException
public SightlyCompilerException()Create a simple exception without any other information. -
SightlyCompilerException
Create an exception with a provided message.- Parameters:
message
- the exception's message
-
SightlyCompilerException
Create an exception with information about the cause.- Parameters:
cause
- the cause
-
SightlyCompilerException
Create an exception that has information about offending syntax input.- Parameters:
message
- the exception's messageoffendingInput
- the offending input, as raw text
-
SightlyCompilerException
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
Creates an exception with a provided message and cause.- Parameters:
message
- the exception's messagecause
- 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 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 Details
-
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
-