com.ls.util.xml
Class XMLConversionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.ls.util.xml.XMLConversionException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JavaToXMLConversionException, XMLToJavaConversionException

public class XMLConversionException
extends Exception

Base class for all Exceptions occuring when converting from or to XML. It contains an error message and an error code specifying the type of exception. It is used e.g. by the JavaXMLConverter class.

Version:
$Revision: 1.0 $
Author:
Last modified by $Author: TBerk $
See Also:
Serialized Form

Field Summary
static int FIELD_RETRIEVE_EXCEPTION
          error type 4 : unable to access an attribute of a java object
static int INTROSPECTION_EXCEPTION
          error type 2 : used for all kinds of exceptions that can occure when accessing fields of java objects by introspection
static int INVALID_OBJECT_EXCEPTION
          error type 5 : used when trying to convert a null reference
static int PROGRAMMING_EXCEPTION
          error type 1: used for exceptions that are low level bugs in the program
static int TRANSIENTIDSET_EXCEPTION
          error type 3 : used whenever a problem occures when rearranging received objects by using a foreign key primary key pair
static int UNSPECIFIED_EXCEPTION
          error type 0 : code not specified
 
Constructor Summary
XMLConversionException(String errorMessage, int errorCode)
          Constructor to specify the error message and the error code.
 
Method Summary
 int getErrorCode()
          Returns the error code of the Exception.
 String toString()
          Returns a string representation of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNSPECIFIED_EXCEPTION

public static final int UNSPECIFIED_EXCEPTION
error type 0 : code not specified

PROGRAMMING_EXCEPTION

public static final int PROGRAMMING_EXCEPTION
error type 1: used for exceptions that are low level bugs in the program

INTROSPECTION_EXCEPTION

public static final int INTROSPECTION_EXCEPTION
error type 2 : used for all kinds of exceptions that can occure when accessing fields of java objects by introspection

TRANSIENTIDSET_EXCEPTION

public static final int TRANSIENTIDSET_EXCEPTION
error type 3 : used whenever a problem occures when rearranging received objects by using a foreign key primary key pair

FIELD_RETRIEVE_EXCEPTION

public static final int FIELD_RETRIEVE_EXCEPTION
error type 4 : unable to access an attribute of a java object

INVALID_OBJECT_EXCEPTION

public static final int INVALID_OBJECT_EXCEPTION
error type 5 : used when trying to convert a null reference
Constructor Detail

XMLConversionException

public XMLConversionException(String errorMessage,
                              int errorCode)
Constructor to specify the error message and the error code.
Parameters:
errorMessage - the precise error message in text
errorCode - the error code for further processing
Method Detail

getErrorCode

public int getErrorCode()
Returns the error code of the Exception.
Returns:
the error code of the Exception.

toString

public String toString()
Returns a string representation of this exception.
Overrides:
toString in class Throwable
Returns:
a string representation of this exception