Class XMLParserException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.xml.sax.SAXException
org.eclipse.birt.core.framework.parser.XMLParserException
All Implemented Interfaces:
Serializable

public class XMLParserException extends SAXException
Reports a parse error. Describes errors as codes so that the error text can be localized.
See Also:
  • Field Details

    • lineNo

      protected int lineNo
      The line of the file on which the error occurred.
    • errorCode

      protected String errorCode
      Detailed error description.
    • tag

      protected String tag
      The element that was in effect at the time of the error.
    • saxException

      protected SAXException saxException
      The SAX exception, if any, associated with the error.
    • errorList

      protected ArrayList errorList
      Additional exceptions, if any, associated with the error.
    • UNKNOWN_TAG

      public static final String UNKNOWN_TAG
      The XML file contains an unsupported element.
      See Also:
    • SAX_ERROR

      public static final String SAX_ERROR
      SAX detected an error with the basic XML syntax of the file.
      See Also:
    • INVALID_BOOLEAN

      public static final String INVALID_BOOLEAN
      A Boolean attribute does not contain a valid value.
      See Also:
    • WARNINGS_FOUND

      public static final String WARNINGS_FOUND
      The parse completed, but recoverable errors occurred.
      See Also:
    • EXCEPTION

      public static final String EXCEPTION
      A generic exception occurred.
      See Also:
    • INVALID_INTEGER

      public static final String INVALID_INTEGER
      An integer attribute contains an invalid value.
      See Also:
  • Constructor Details

    • XMLParserException

      public XMLParserException(String errCode)
      Constructor.
      Parameters:
      errCode - the error code
    • XMLParserException

      public XMLParserException(SAXException e)
      Constructor.
      Parameters:
      e - a SAX exception
    • XMLParserException

      public XMLParserException(Exception e)
      Constructor.
      Parameters:
      e - a generic exception
    • XMLParserException

      public XMLParserException(Exception e, String errCode)
      Constructor.
      Parameters:
      e - generic exception
      errCode - error code that explains the exception
    • XMLParserException

      public XMLParserException(ArrayList errors)
      Constructor.
      Parameters:
      errors - list of errors
  • Method Details

    • setLineNumber

      public void setLineNumber(int n)
      Sets the line number associated with the exception.
      Parameters:
      n - The line number to set.
    • setTag

      public void setTag(String theTag)
      Sets the element associated with the exception.
      Parameters:
      theTag - the element name to set.
    • getErrorCode

      public String getErrorCode()
      Gets the error code associated with the exception.
      Returns:
      the error code
    • getTag

      public String getTag()
      Gets the element associated with the exception.
      Returns:
      the element name
    • getLineNumber

      public int getLineNumber()
      Gets the line number associated with the exception.
      Returns:
      the line number
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class SAXException
    • getErrorList

      public List getErrorList()
      Returns the error list.
      Returns:
      the error list