Class ElementException

java.lang.Object
java.lang.Throwable
java.lang.Exception
se.datadosen.tags.ElementException
All Implemented Interfaces:
Serializable, ContextualException

public class ElementException extends Exception implements ContextualException
Thrown when there is a ja: element parsing error while parsing skin templates
See Also:
  • Constructor Details

    • ElementException

      public ElementException(String msg)
    • ElementException

      public ElementException(String message, Throwable cause)
    • ElementException

      public ElementException(Throwable cause)
    • ElementException

      public ElementException(String message, File file, int lineNumber)
      Creates a ElementException with message, filename and linenumber to be used in error messages.
      Parameters:
      message - The string to use in the message
      file - The file or resource name describing the location of a script error causing the ElementException to be thrown.
      lineNumber - A line number describing the location of a script error causing the ElementException to be thrown.
    • ElementException

      public ElementException(String message, File file, int lineNumber, int columnNumber)
      ElementException constructor specifying message, filename, line number and column number.
      Parameters:
      message - The message.
      file - The filename
      lineNumber - the line number.
      columnNumber - the column number.
    • ElementException

      public ElementException(String message, Section sec, int index)
      Construct an ElementException based on context from section and index
      Parameters:
      message -
      sec -
      index -
    • ElementException

      public ElementException(String message, Section sec)
      Construct an ElementException based on context from section and index
      Parameters:
      message -
      sec -
  • Method Details

    • getLineNumber

      public int getLineNumber()
      Get the line number on which an error occurred.
      Specified by:
      getLineNumber in interface ContextualException
      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:
      getColumnNumber in interface ContextualException
      Returns:
      The column number. Returns -1 if a column number is unavailable.
    • getFile

      public File getFile()
      Get the source of the script causing the error.
      Specified by:
      getFile in interface ContextualException
      Returns:
      The file of the script or some other string describing the script source. May return null if the source file is unknown
    • getMessage

      public String 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:
      getMessage in interface ContextualException
      Overrides:
      getMessage in class Throwable
      Returns:
      The error message.