Top Description Fields Constructors Methods
com.thoughtworks.xstream.converters

public abstract Class ErrorWritingException

extends XStreamException
implements ErrorWriter
Class Inheritance
All Implemented Interfaces
com.thoughtworks.xstream.converters.ErrorWriter
Known Direct Subclasses
com.thoughtworks.xstream.converters.reflection.ObjectAccessException, com.thoughtworks.xstream.converters.ConversionException
Imports
java.util.Iterator, .Map, com.thoughtworks.xstream.XStreamException, com.thoughtworks.xstream.core.util.OrderRetainingMap

Deprecated

as a consequence of XStreamException being deprecated. See corresponding docs for further information.

Abstract base class for exceptions supporting an ErrorWriter. It can be passed around to things accepting an ErrorWriter to add diagnostics.
Author
Jörg Schaible
Since
1.4.9
See Also
ErrorWriter

Field Summary

Modifier and TypeField and Description
private static final String
private final Map<K, V>

Constructor Summary

AccessConstructor and Description
public
ErrorWritingException(String
the error message
message
)

Constructs a ErrorWritingException.

public
ErrorWritingException(Throwable
the causing exception
cause
)

Constructs a ErrorWritingException.

public
ErrorWritingException(String
the error message
message
,
Throwable
the causing exception
cause
)

Constructs a ErrorWritingException.

Method Summary

Modifier and TypeMethod and Description
public void
add(String
something to identify the type of information (e.g. 'XPath').
name
,
String
detail of the message (e.g. '/blah/moo[3]'
information
)

Implements com.thoughtworks.xstream.converters.ErrorWriter.add.

Add some information to the error message.
private void
addData(String msg, Throwable cause)

public String
get(String
the key of the message
errorKey
)

Implements com.thoughtworks.xstream.converters.ErrorWriter.get.

Retrieve information of the error message.
public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.
public String
public Iterator<E>
keys()

Implements com.thoughtworks.xstream.converters.ErrorWriter.keys.

Retrieve an iterator over all keys of the error message.
public void
set(String
something to identify the type of information (e.g. 'XPath').
name
,
String
detail of the message (e.g. '/blah/moo[3]'
information
)

Implements com.thoughtworks.xstream.converters.ErrorWriter.set.

Set some information to the error message.

Field Detail

SEPARATORback to summary
private static final String SEPARATOR
stuffback to summary
private final Map<K, V> stuff

Constructor Detail

ErrorWritingExceptionback to summary
public ErrorWritingException(String message)

Constructs a ErrorWritingException.

Parameters
message:String

the error message

Since
1.4.9
ErrorWritingExceptionback to summary
public ErrorWritingException(Throwable cause)

Constructs a ErrorWritingException.

Parameters
cause:Throwable

the causing exception

Since
1.4.9
ErrorWritingExceptionback to summary
public ErrorWritingException(String message, Throwable cause)

Constructs a ErrorWritingException.

Parameters
message:String

the error message

cause:Throwable

the causing exception

Since
1.4.9

Method Detail

addback to summary
public void add(String name, String information)

Implements com.thoughtworks.xstream.converters.ErrorWriter.add.

Doc from com.thoughtworks.xstream.converters.ErrorWriter.add.

Add some information to the error message. The information will be added even if the identifier is already in use.

Parameters
name:String

something to identify the type of information (e.g. 'XPath').

information:String

detail of the message (e.g. '/blah/moo[3]'

addDataback to summary
private void addData(String msg, Throwable cause)
getback to summary
public String get(String errorKey)

Implements com.thoughtworks.xstream.converters.ErrorWriter.get.

Doc from com.thoughtworks.xstream.converters.ErrorWriter.get.

Retrieve information of the error message.

Parameters
errorKey:String

the key of the message

Returns:String

the value

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

getShortMessageback to summary
public String getShortMessage()
keysback to summary
public Iterator<E> keys()

Implements com.thoughtworks.xstream.converters.ErrorWriter.keys.

Doc from com.thoughtworks.xstream.converters.ErrorWriter.keys.

Retrieve an iterator over all keys of the error message.

Returns:Iterator<E>

an Iterator

setback to summary
public void set(String name, String information)

Implements com.thoughtworks.xstream.converters.ErrorWriter.set.

Doc from com.thoughtworks.xstream.converters.ErrorWriter.set.

Set some information to the error message. If the identifier is already in use, the new information will replace the old one.

Parameters
name:String

something to identify the type of information (e.g. 'XPath').

information:String

detail of the message (e.g. '/blah/moo[3]'