com.ls.util.xml
Class XMLToJavaConversionException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--com.ls.util.xml.XMLConversionException
|
+--com.ls.util.xml.XMLToJavaConversionException
- All Implemented Interfaces:
- Serializable
- public class XMLToJavaConversionException
- extends XMLConversionException
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
Constructor Summary |
XMLToJavaConversionException(String errorMessage,
int errorCode,
String xmlString)
Constructor to specify the error message, the error code and the xml string thats
conversion caused the exception |
Method Summary |
String |
getXMLString()
Returns the xml string(max. 5000 character) thats conversion caused the exception. |
void |
setXMLString(String xmlString)
Allows to specify the xml string that caused the exception. |
String |
toString()
Returns a string representation of this exception. |
NO_CLASS_PACKAGE_MAPPING_EXCEPTION
public static final int NO_CLASS_PACKAGE_MAPPING_EXCEPTION
- error type 100 : used if a call to xmlToJava is performed without calling setClassPackageMapping()
CLASS_CREATION_EXCEPTION
public static final int CLASS_CREATION_EXCEPTION
- error type 101 : indicates that a classname is part of the xml string that is not in the CLASSPATH
FIELD_SETTING_EXCEPTION
public static final int FIELD_SETTING_EXCEPTION
- error type 103 : unable to change an attribute of a java object
INVALID_DATE_FORMAT_EXCEPTION
public static final int INVALID_DATE_FORMAT_EXCEPTION
- error type 104 : a date (treated as simple data type) does not conform to the defined date format
INVALID_XML_FORMAT_EXCEPTION
public static final int INVALID_XML_FORMAT_EXCEPTION
- error type 105 : indicates that the xml string could not be parsed by the xml parser used
XMLToJavaConversionException
public XMLToJavaConversionException(String errorMessage,
int errorCode,
String xmlString)
- Constructor to specify the error message, the error code and the xml string thats
conversion caused the exception
- Parameters:
errorMessage
- the precise error message in texterrorCode
- the error code for further processingxmlString
- xml string thats conversion caused the exception
getXMLString
public String getXMLString()
- Returns the xml string(max. 5000 character) thats conversion caused the exception.
- Returns:
- the xml string thats conversion caused the exception.
setXMLString
public void setXMLString(String xmlString)
- Allows to specify the xml string that caused the exception.
- Parameters:
xmlString
- the xml string thats conversion caused the exception.
toString
public String toString()
- Returns a string representation of this exception.
- Overrides:
toString
in class XMLConversionException
- Returns:
- a string representation of this exception