Class ScriptError
java.lang.Object
org.openhab.core.model.script.engine.ScriptError
A detailed error information for a script
- Author:
- Kai Kreuzer - Initial contribution
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionScriptError(String message, int line, int column, int length) Creates new ScriptError.ScriptError(String message, org.eclipse.emf.ecore.EObject atEObject) Creates new ScriptError. -
Method Summary
Modifier and TypeMethodDescriptionintGet the column number on which an error occurred.intGet the number of columns affected by the error.intGet the line number on which an error occurred.Returns a message containing the String passed to a constructor as well as line and column numbers if any of these are known.
-
Constructor Details
-
ScriptError
Creates new ScriptError.- Parameters:
message- Error Messageline- Line number, or -1 if unknowncolumn- Column number, or -1 if unknownlength- Length, or -1 if unknown
-
ScriptError
Creates new ScriptError. This constructor uses the given EObject instance to calculate the exact position.- Parameters:
message- Error MessageatEObject- the EObject instance to use for calculating the position
-
-
Method Details
-
getMessage
Returns a message containing the String passed to a constructor as well as line and column numbers if any of these are known.- Returns:
- The error message.
-
getLineNumber
public int getLineNumber()Get the line number on which an error occurred.- Returns:
- The line number. Returns -1 if a line number is unavailable.
-
getColumnNumber
public int getColumnNumber()Get the column number on which an error occurred.- Returns:
- The column number. Returns -1 if a column number is unavailable.
-
getLength
public int getLength()Get the number of columns affected by the error.- Returns:
- The number of columns. Returns -1 if unavailable.
-