Hilbert II - Version 0.03.04

org.qedeq.kernel.common
Class SyntaxException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.qedeq.kernel.common.QedeqException
              extended byorg.qedeq.kernel.common.SyntaxException
All Implemented Interfaces:
Serializable

public final class SyntaxException
extends QedeqException

Exception that occurs during XML parsing. It specifies an syntactical error. It can also mark a lack of inner consistence of something. Also a programming error can lead to this exception.

Version:
$Revision: 1.1 $
See Also:
Serialized Form

Field Summary
static int EMPTY_ATTRIBUTE_CODE
          Error code for empty attribute.
static String EMPTY_ATTRIBUTE_TEXT_1
          Missing attribute text.
static String EMPTY_ATTRIBUTE_TEXT_2
          Missing attribute, part two.
static int MISSING_ATTRIBUTE_CODE
          Error code for missing attribute.
static String MISSING_ATTRIBUTE_TEXT_1
          Missing attribute text.
static String MISSING_ATTRIBUTE_TEXT_2
          Missing attribute, part two.
static int PROGRAMMING_ERROR_CODE
          Error code for a programming error.
static String PROGRAMMING_ERROR_TEXT
          Unexpected tag message text, part one.
static int SAX_PARSER_EXCEPTION
          Error code for Exceptions thrown by the SAXParser.
static int UNEXPECTED_DATA_CODE
          Error code for unexpected character data.
static String UNEXPECTED_DATA_TEXT
          Unexpected tag message text, part one.
static int UNEXPECTED_TAG_CODE
          Error code for unexpected tag.
static String UNEXPECTED_TAG_TEXT
          Unexpected tag message text.
 
Fields inherited from class java.lang.Exception
 
Method Summary
static SyntaxException createByRuntimeException(RuntimeException e)
          Create exception for a programming error.
static SyntaxException createBySAXParseException(SAXParseException e, URL url)
          Create exception for SAXException.
static SyntaxException createEmptyAttributeException(String name, String attribute)
          Create exception for empty attribute within a tag.
static SyntaxException createMissingAttributeException(String name, String attribute)
          Create exception for missing attribute within a tag.
static SyntaxException createUnexpectedTagException(String name)
          Create exception for unexpected tag.
static SyntaxException createUnexpectedTextDataException(String name, String value)
          Create exception for unexpected text data within a tag.
 SourcePosition getErrorPosition()
          Get error position.
 void setErrorPosition(SourcePosition position)
          Set error position.
 
Methods inherited from class org.qedeq.kernel.common.QedeqException
getErrorCode
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SAX_PARSER_EXCEPTION

public static final int SAX_PARSER_EXCEPTION
Error code for Exceptions thrown by the SAXParser.

See Also:
Constant Field Values

UNEXPECTED_TAG_CODE

public static final int UNEXPECTED_TAG_CODE
Error code for unexpected tag.

See Also:
Constant Field Values

UNEXPECTED_TAG_TEXT

public static final String UNEXPECTED_TAG_TEXT
Unexpected tag message text.

See Also:
Constant Field Values

UNEXPECTED_DATA_CODE

public static final int UNEXPECTED_DATA_CODE
Error code for unexpected character data.

See Also:
Constant Field Values

UNEXPECTED_DATA_TEXT

public static final String UNEXPECTED_DATA_TEXT
Unexpected tag message text, part one.

See Also:
Constant Field Values

MISSING_ATTRIBUTE_CODE

public static final int MISSING_ATTRIBUTE_CODE
Error code for missing attribute.

See Also:
Constant Field Values

MISSING_ATTRIBUTE_TEXT_1

public static final String MISSING_ATTRIBUTE_TEXT_1
Missing attribute text.

See Also:
Constant Field Values

MISSING_ATTRIBUTE_TEXT_2

public static final String MISSING_ATTRIBUTE_TEXT_2
Missing attribute, part two.

See Also:
Constant Field Values

EMPTY_ATTRIBUTE_CODE

public static final int EMPTY_ATTRIBUTE_CODE
Error code for empty attribute.

See Also:
Constant Field Values

EMPTY_ATTRIBUTE_TEXT_1

public static final String EMPTY_ATTRIBUTE_TEXT_1
Missing attribute text.

See Also:
Constant Field Values

EMPTY_ATTRIBUTE_TEXT_2

public static final String EMPTY_ATTRIBUTE_TEXT_2
Missing attribute, part two.

See Also:
Constant Field Values

PROGRAMMING_ERROR_CODE

public static final int PROGRAMMING_ERROR_CODE
Error code for a programming error.

See Also:
Constant Field Values

PROGRAMMING_ERROR_TEXT

public static final String PROGRAMMING_ERROR_TEXT
Unexpected tag message text, part one.

See Also:
Constant Field Values
Method Detail

getErrorPosition

public final SourcePosition getErrorPosition()
Get error position.

Returns:
Error position.

setErrorPosition

public final void setErrorPosition(SourcePosition position)
Set error position.

Parameters:
position - Error position.

createUnexpectedTagException

public static final SyntaxException createUnexpectedTagException(String name)
Create exception for unexpected tag.

Parameters:
name - Tag name.
Returns:
Exception.

createUnexpectedTextDataException

public static final SyntaxException createUnexpectedTextDataException(String name,
                                                                      String value)
Create exception for unexpected text data within a tag.

Parameters:
name - Tag name.
value - Data found.
Returns:
Exception.

createMissingAttributeException

public static final SyntaxException createMissingAttributeException(String name,
                                                                    String attribute)
Create exception for missing attribute within a tag.

Parameters:
name - Tag name.
attribute - Attribute name.
Returns:
Exception.

createEmptyAttributeException

public static final SyntaxException createEmptyAttributeException(String name,
                                                                  String attribute)
Create exception for empty attribute within a tag.

Parameters:
name - Tag name.
attribute - Attribute name.
Returns:
Exception.

createBySAXParseException

public static final SyntaxException createBySAXParseException(SAXParseException e,
                                                              URL url)
Create exception for SAXException.

Parameters:
e - Exception thrown by the SAXParser.
url - Parsed file.
Returns:
Created exception.

createByRuntimeException

public static final SyntaxException createByRuntimeException(RuntimeException e)
Create exception for a programming error.

Parameters:
e - Exception.
Returns:
Created exception.

Hilbert II - Version 0.03.04

©left GNU General Public Licence
All Rights Reserved.