public class

ConversionException

extends XStreamException
implements ErrorWriter
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.ConversionException
Known Direct Subclasses

Class Overview

Thrown by Converter implementations when they cannot convert an object to/from textual data. When this exception is thrown it can be passed around to things that accept an ErrorWriter, allowing them to add diagnostics to the stack trace.

See Also

Summary

Public Constructors
ConversionException(String msg, Throwable cause)
ConversionException(String msg)
ConversionException(Throwable cause)
Public Methods
void add(String name, String information)
Add some information to the error message.
String get(String errorKey)
Retrieve information of the error message.
String getMessage()
String getShortMessage()
Iterator keys()
Retrieve an iterator over all keys of the error message.
[Expand]
Inherited Methods
From class com.thoughtworks.xstream.XStreamException
From class com.thoughtworks.xstream.core.BaseException
From class java.lang.Throwable
From class java.lang.Object
From interface com.thoughtworks.xstream.converters.ErrorWriter

Public Constructors

public ConversionException (String msg, Throwable cause)

public ConversionException (String msg)

public ConversionException (Throwable cause)

Public Methods

public void add (String name, String information)

Add some information to the error message.

Parameters
name something to identify the type of information (e.g. 'XPath').
information detail of the message (e.g. '/blah/moo[3]'

public String get (String errorKey)

Retrieve information of the error message.

Parameters
errorKey the key of the message
Returns
  • the value

public String getMessage ()

public String getShortMessage ()

public Iterator keys ()

Retrieve an iterator over all keys of the error message.

Returns
  • an Iterator