Class ParseException

  • All Implemented Interfaces:
    java.io.Serializable, ARPErrorNumbers

    public class ParseException
    extends org.xml.sax.SAXParseException
    implements ARPErrorNumbers
    An exception during the RDF processing of ARP. Note: it is distinguished from an XML related exception from Xerces because while both are SAXParseException's, the latter are not ParseException's.
    See Also:
    Serialized Form
    • Constructor Detail

      • ParseException

        public ParseException​(int id,
                              ARPLocation where,
                              java.lang.Exception e)
    • Method Detail

      • getErrorNumber

        public int getErrorNumber()
        The error number (from ARPErrorNumbers) related to this exception.
        Returns:
        The error number.
      • isSyntaxError

        public boolean isSyntaxError()
        Is this error an RDF syntax error. A syntax error indicates that well-formed XML, uses RDF properties and attributes, and whitespace and XML elements, in a way that does not conform with the RDF/XML Syntax (Revised) specification. (Currently most such errors have code ARPErrorNumbers.ERR_SYNTAX_ERROR, but this may change in the future).
        Returns:
        True if this is a syntax error
      • promote

        public void promote()
        Intended for use within an RDFErrorHandler. This method is untested. Marks the exception to be promoted to be thrown from the parser's entry method.
      • getMessage

        public java.lang.String getMessage()
        The message without location information. Use either the formatMessage method, or the SAXParseException interface, to access the location information.
        Overrides:
        getMessage in class org.xml.sax.SAXException
        Returns:
        The exception message.
      • formatMessage

        public static java.lang.String formatMessage​(java.lang.Exception e)
        Calls e.getMessage() and also accesses line and column information for SAXParseException's.
        Parameters:
        e - The exception to describe.
        Returns:
        e.getMessage() possibly prepended by error location information.
      • isPromoted

        public boolean isPromoted()
      • errorCodeName

        public static java.lang.String errorCodeName​(int errNo)
        The string from ARPErrorNumbers associated with an integer error code
        Parameters:
        errNo - An error code from ARPErrorNumbers.
        Returns:
        The field name from ARPErrorNumbers with this error number, or null
      • errorCode

        public static int errorCode​(java.lang.String upper)
        The integer code associated with a string from ARPErrorNumbers.
        Parameters:
        upper - A field name from ARPErrorNumbers, (in upper case).
        Returns:
        The integer value or -1, if none.