Package org.jibx.runtime
Class JiBXParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.jibx.runtime.JiBXException
org.jibx.runtime.JiBXParseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
JiBXConstrainedParseException
JiBX parsing exception class. This subclass of JiBXException provides
additional details when a parsing error occurs such as what tag was
being parsed and what value caused the error.
- Author:
- Joshua Davies
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJiBXParseException
(String msg, String value) Constructor from message.Constructor from message, wrapped exception and tag name.JiBXParseException
(String msg, String value, Throwable root) Constructor from message and wrapped exception. -
Method Summary
Modifier and TypeMethodDescriptionboolean
This is only used for testing purposes.Append useful parsing details onto the default message.void
setNamespace
(String namespace) Add namespace detail to the exception.void
setTagName
(String tagName) Add tag name detail to the exception.Methods inherited from class org.jibx.runtime.JiBXException
getCause, getRootCause, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Field Details
-
m_value
-
m_namespace
-
m_tagName
-
-
Constructor Details
-
JiBXParseException
Constructor from message.- Parameters:
msg
- the throwers description of what's gone wrong.value
- the value which was unparseable (in string format).
-
JiBXParseException
Constructor from message and wrapped exception.- Parameters:
msg
- the throwers description of what's gone wrong.value
- the value which was unparseable (in string format).root
- exception which caused this exception
-
JiBXParseException
public JiBXParseException(String msg, String value, String namespace, String tagName, Throwable root) Constructor from message, wrapped exception and tag name.- Parameters:
msg
- message describing the exception conditionvalue
- the value which was unparseable (in string format).namespace
- the namespace (if any) associated with the tag.tagName
- the name of the tag whose element caused the exception.root
- exception which caused this exception
-
-
Method Details
-
setNamespace
Add namespace detail to the exception.- Parameters:
namespace
- the namespace of the offending tag.
-
setTagName
Add tag name detail to the exception.- Parameters:
tagName
- the name of the offending tag.
-
getMessage
Append useful parsing details onto the default message.- Overrides:
getMessage
in classThrowable
- Returns:
- the parent's message plus "caused by value" addendum.
-
equals
This is only used for testing purposes.
-