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:
java.io.Serializable
public class XMLParserException extends org.xml.sax.SAXException
Reports a parse error. Describes errors as codes so that the error text can be localized.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
errorCode
Detailed error description.protected java.util.ArrayList
errorList
Additional exceptions, if any, associated with the error.static java.lang.String
EXCEPTION
A generic exception occurred.static java.lang.String
INVALID_BOOLEAN
A Boolean attribute does not contain a valid value.static java.lang.String
INVALID_INTEGER
An integer attribute contains an invalid value.protected int
lineNo
The line of the file on which the error occurred.static java.lang.String
SAX_ERROR
SAX detected an error with the basic XML syntax of the file.protected org.xml.sax.SAXException
saxException
The SAX exception, if any, associated with the error.protected java.lang.String
tag
The element that was in effect at the time of the error.static java.lang.String
UNKNOWN_TAG
The XML file contains an unsupported element.static java.lang.String
WARNINGS_FOUND
The parse completed, but recoverable errors occurred.
-
Constructor Summary
Constructors Constructor Description XMLParserException(java.lang.Exception e)
Constructor.XMLParserException(java.lang.Exception e, java.lang.String errCode)
Constructor.XMLParserException(java.lang.String errCode)
Constructor.XMLParserException(java.util.ArrayList errors)
Constructor.XMLParserException(org.xml.sax.SAXException e)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getErrorCode()
Gets the error code associated with the exception.java.util.List
getErrorList()
Returns the error list.int
getLineNumber()
Gets the line number associated with the exception.java.lang.String
getMessage()
java.lang.String
getTag()
Gets the element associated with the exception.void
setLineNumber(int n)
Sets the line number associated with the exception.void
setTag(java.lang.String theTag)
Sets the element associated with the exception.
-
-
-
Field Detail
-
lineNo
protected int lineNo
The line of the file on which the error occurred.
-
errorCode
protected java.lang.String errorCode
Detailed error description.
-
tag
protected java.lang.String tag
The element that was in effect at the time of the error.
-
saxException
protected org.xml.sax.SAXException saxException
The SAX exception, if any, associated with the error.
-
errorList
protected java.util.ArrayList errorList
Additional exceptions, if any, associated with the error.
-
UNKNOWN_TAG
public static final java.lang.String UNKNOWN_TAG
The XML file contains an unsupported element.- See Also:
- Constant Field Values
-
SAX_ERROR
public static final java.lang.String SAX_ERROR
SAX detected an error with the basic XML syntax of the file.- See Also:
- Constant Field Values
-
INVALID_BOOLEAN
public static final java.lang.String INVALID_BOOLEAN
A Boolean attribute does not contain a valid value.- See Also:
- Constant Field Values
-
WARNINGS_FOUND
public static final java.lang.String WARNINGS_FOUND
The parse completed, but recoverable errors occurred.- See Also:
- Constant Field Values
-
EXCEPTION
public static final java.lang.String EXCEPTION
A generic exception occurred.- See Also:
- Constant Field Values
-
INVALID_INTEGER
public static final java.lang.String INVALID_INTEGER
An integer attribute contains an invalid value.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XMLParserException
public XMLParserException(java.lang.String errCode)
Constructor.- Parameters:
errCode
- the error code
-
XMLParserException
public XMLParserException(org.xml.sax.SAXException e)
Constructor.- Parameters:
e
- a SAX exception
-
XMLParserException
public XMLParserException(java.lang.Exception e)
Constructor.- Parameters:
e
- a generic exception
-
XMLParserException
public XMLParserException(java.lang.Exception e, java.lang.String errCode)
Constructor.- Parameters:
e
- generic exceptionerrCode
- error code that explains the exception
-
XMLParserException
public XMLParserException(java.util.ArrayList errors)
Constructor.- Parameters:
errors
- list of errors
-
-
Method Detail
-
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(java.lang.String theTag)
Sets the element associated with the exception.- Parameters:
theTag
- the element name to set.
-
getErrorCode
public java.lang.String getErrorCode()
Gets the error code associated with the exception.- Returns:
- the error code
-
getTag
public java.lang.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 java.lang.String getMessage()
- Overrides:
getMessage
in classorg.xml.sax.SAXException
-
getErrorList
public java.util.List getErrorList()
Returns the error list.- Returns:
- the error list
-
-