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
Reports a parse error. Describes errors as codes so that the error text can
be localized.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Detailed error description.protected ArrayList
Additional exceptions, if any, associated with the error.static final String
A generic exception occurred.static final String
A Boolean attribute does not contain a valid value.static final String
An integer attribute contains an invalid value.protected int
The line of the file on which the error occurred.static final String
SAX detected an error with the basic XML syntax of the file.protected SAXException
The SAX exception, if any, associated with the error.protected String
The element that was in effect at the time of the error.static final String
The XML file contains an unsupported element.static final String
The parse completed, but recoverable errors occurred. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.XMLParserException
(Exception e, String errCode) Constructor.XMLParserException
(String errCode) Constructor.XMLParserException
(ArrayList errors) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the error code associated with the exception.Returns the error list.int
Gets the line number associated with the exception.getTag()
Gets the element associated with the exception.void
setLineNumber
(int n) Sets the line number associated with the exception.void
Sets the element associated with the exception.Methods inherited from class org.xml.sax.SAXException
getCause, getException, toString
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
lineNo
protected int lineNoThe line of the file on which the error occurred. -
errorCode
Detailed error description. -
tag
The element that was in effect at the time of the error. -
saxException
The SAX exception, if any, associated with the error. -
errorList
Additional exceptions, if any, associated with the error. -
UNKNOWN_TAG
The XML file contains an unsupported element.- See Also:
-
SAX_ERROR
SAX detected an error with the basic XML syntax of the file.- See Also:
-
INVALID_BOOLEAN
A Boolean attribute does not contain a valid value.- See Also:
-
WARNINGS_FOUND
The parse completed, but recoverable errors occurred.- See Also:
-
EXCEPTION
A generic exception occurred.- See Also:
-
INVALID_INTEGER
An integer attribute contains an invalid value.- See Also:
-
-
Constructor Details
-
XMLParserException
Constructor.- Parameters:
errCode
- the error code
-
XMLParserException
Constructor.- Parameters:
e
- a SAX exception
-
XMLParserException
Constructor.- Parameters:
e
- a generic exception
-
XMLParserException
Constructor.- Parameters:
e
- generic exceptionerrCode
- error code that explains the exception
-
XMLParserException
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
Sets the element associated with the exception.- Parameters:
theTag
- the element name to set.
-
getErrorCode
Gets the error code associated with the exception.- Returns:
- the error code
-
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
- Overrides:
getMessage
in classSAXException
-
getErrorList
Returns the error list.- Returns:
- the error list
-