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 StringDetailed error description.protected ArrayListAdditional exceptions, if any, associated with the error.static final StringA generic exception occurred.static final StringA Boolean attribute does not contain a valid value.static final StringAn integer attribute contains an invalid value.protected intThe line of the file on which the error occurred.static final StringSAX detected an error with the basic XML syntax of the file.protected SAXExceptionThe SAX exception, if any, associated with the error.protected StringThe element that was in effect at the time of the error.static final StringThe XML file contains an unsupported element.static final StringThe 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.intGets the line number associated with the exception.getTag()Gets the element associated with the exception.voidsetLineNumber(int n) Sets the line number associated with the exception.voidSets the element associated with the exception.Methods inherited from class org.xml.sax.SAXException
getCause, getException, toStringMethods 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:
getMessagein classSAXException
-
getErrorList
Returns the error list.- Returns:
- the error list
-