org.geotoolkit.util.converter
Class NonconvertibleObjectException

Object
  extended by Throwable
      extended by Exception
          extended by NonconvertibleObjectException
All Implemented Interfaces:
Serializable

public class NonconvertibleObjectException
extends Exception

Thrown when an object can not be converted from the source type the target type.

Since:
3.00
Version:
3.00
Author:
Martin Desruisseaux (Geomatys)
See Also:
Serialized Form
Module:
utility/geotk-utility (download)    View source code for this class

Constructor Summary
NonconvertibleObjectException()
          Constructs a new exception with no message.
NonconvertibleObjectException(String message)
          Constructs a new exception with the specified detail message.
NonconvertibleObjectException(String message, Throwable cause)
          Constructs a new exception with the specified detail message and cause.
NonconvertibleObjectException(Throwable cause)
          Constructs a new exception with the specified cause.
 
Method Summary
 List<Exception> allAttempts()
          Returns the reasons why the conversion failed.
 
Methods inherited from class Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonconvertibleObjectException

public NonconvertibleObjectException()
Constructs a new exception with no message.


NonconvertibleObjectException

public NonconvertibleObjectException(String message)
Constructs a new exception with the specified detail message.

Parameters:
message - The detail message.

NonconvertibleObjectException

public NonconvertibleObjectException(String message,
                                     Throwable cause)
Constructs a new exception with the specified detail message and cause.

Parameters:
message - The detail message.
cause - The cause.

NonconvertibleObjectException

public NonconvertibleObjectException(Throwable cause)
Constructs a new exception with the specified cause.

Parameters:
cause - The cause.
Method Detail

allAttempts

public final List<Exception> allAttempts()
Returns the reasons why the conversion failed. The returned list contains typically only one element, which is this exception. But if more than one converter were tried before to give up, the exception thrown by those converters are listed as well.

The returned list is modifiable; callers can add additional causes to this list.

Returns:
The reasons why each attempt failed.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.