Class ErrorWritingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.thoughtworks.xstream.core.BaseException
com.thoughtworks.xstream.XStreamException
com.thoughtworks.xstream.converters.ErrorWritingException
- All Implemented Interfaces:
ErrorWriter
,Serializable
- Direct Known Subclasses:
ConversionException
,ObjectAccessException
Abstract base class for exceptions supporting an ErrorWriter. It can be passed around to things accepting an
ErrorWriter to add diagnostics.
- Since:
- 1.4.9
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionErrorWritingException
(String message) Constructs a ErrorWritingException.ErrorWritingException
(String message, Throwable cause) Constructs a ErrorWritingException.ErrorWritingException
(Throwable cause) Constructs a ErrorWritingException. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add some information to the error message.private void
Retrieve information of the error message.keys()
Retrieve an iterator over all keys of the error message.void
Set some information to the error message.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
SEPARATOR
- See Also:
-
stuff
-
-
Constructor Details
-
ErrorWritingException
Constructs a ErrorWritingException.- Parameters:
message
- the error message- Since:
- 1.4.9
-
ErrorWritingException
Constructs a ErrorWritingException.- Parameters:
cause
- the causing exception- Since:
- 1.4.9
-
ErrorWritingException
Constructs a ErrorWritingException.- Parameters:
message
- the error messagecause
- the causing exception- Since:
- 1.4.9
-
-
Method Details
-
addData
-
get
Description copied from interface:ErrorWriter
Retrieve information of the error message.- Specified by:
get
in interfaceErrorWriter
- Parameters:
errorKey
- the key of the message- Returns:
- the value
-
add
Description copied from interface:ErrorWriter
Add some information to the error message. The information will be added even if the identifier is already in use.- Specified by:
add
in interfaceErrorWriter
- Parameters:
name
- something to identify the type of information (e.g. 'XPath').information
- detail of the message (e.g. '/blah/moo[3]'
-
set
Description copied from interface:ErrorWriter
Set some information to the error message. If the identifier is already in use, the new information will replace the old one.- Specified by:
set
in interfaceErrorWriter
- Parameters:
name
- something to identify the type of information (e.g. 'XPath').information
- detail of the message (e.g. '/blah/moo[3]'
-
keys
Description copied from interface:ErrorWriter
Retrieve an iterator over all keys of the error message.- Specified by:
keys
in interfaceErrorWriter
- Returns:
- an Iterator
-
getMessage
- Overrides:
getMessage
in classThrowable
-
getShortMessage
-