Class ElementException
java.lang.Object
java.lang.Throwable
java.lang.Exception
se.datadosen.tags.ElementException
- All Implemented Interfaces:
Serializable,ContextualException
Thrown when there is a ja: element parsing error while parsing skin templates
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionElementException(String msg) ElementException(String message, File file, int lineNumber) Creates aElementExceptionwith message, filename and linenumber to be used in error messages.ElementException(String message, File file, int lineNumber, int columnNumber) ElementExceptionconstructor specifying message, filename, line number and column number.ElementException(String message, Throwable cause) ElementException(String message, Section sec) Construct an ElementException based on context from section and indexElementException(String message, Section sec, int index) Construct an ElementException based on context from section and indexElementException(Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionintGet the column number on which an error occurred.getFile()Get the source of the script causing 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 and filename if any of these are known.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface se.datadosen.util.ContextualException
getCause
-
Constructor Details
-
ElementException
-
ElementException
-
ElementException
-
ElementException
Creates aElementExceptionwith message, filename and linenumber to be used in error messages.- Parameters:
message- The string to use in the messagefile- The file or resource name describing the location of a script error causing theElementExceptionto be thrown.lineNumber- A line number describing the location of a script error causing theElementExceptionto be thrown.
-
ElementException
-
ElementException
-
ElementException
-
-
Method Details
-
getLineNumber
public int getLineNumber()Get the line number on which an error occurred.- Specified by:
getLineNumberin interfaceContextualException- 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.- Specified by:
getColumnNumberin interfaceContextualException- Returns:
- The column number. Returns -1 if a column number is unavailable.
-
getFile
Get the source of the script causing the error.- Specified by:
getFilein interfaceContextualException- Returns:
- The file of the script or some other string describing the script source. May return null if the source file is unknown
-
getMessage
Returns a message containing the String passed to a constructor as well as line and column numbers and filename if any of these are known.- Specified by:
getMessagein interfaceContextualException- Overrides:
getMessagein classThrowable- Returns:
- The error message.
-