net.sourceforge.esw.collection
Class TransducerException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--net.sourceforge.esw.collection.TransducerException
All Implemented Interfaces:
java.io.Serializable

public class TransducerException
extends java.lang.Exception

Represents the things that can go wrong during a transduction.

During an IMetaCollection instance's transduction using its ITransducer instance, many things could go wrong. This exception is designed to report those things to all the actors controlling an IMetaCollection instance's transduction.

To that end, we provide the ability to collect all the bad things that happen into this TransducerException. You can see all those Exceptions by calling getExceptions()

See Also:
IMetaCollection, ITransducer, Serialized Form

Field Summary
protected  java.util.Collection exceptions
          The Collection of exceptions for this TransducerException instance.
 
Constructor Summary
TransducerException(java.lang.Exception aException)
          Creates a new TransducerException instance with the specified reason for the exception.
TransducerException(java.lang.String aReason)
          Creates a new TransducerException instance with the specified reason for the exception.
TransducerException(java.lang.String aReason, java.util.Collection aExceptions)
          Creates a new TransducerException instance with the specified reason for the exception and a Collection of Exception instances that caused this TransducerException instance to be thrown.
 
Method Summary
 void addException(java.lang.Exception aException)
          Adds a new Exception instance to this TransducerException instance.
 java.util.Collection getExceptions()
          Returns the Collection of Exception instances that justifiy this TransducerException instance.
 void printStackTrace()
          Overrides the default printStackTrace() to allow proper printing of this composite exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

exceptions

protected java.util.Collection exceptions
The Collection of exceptions for this TransducerException instance.
Constructor Detail

TransducerException

public TransducerException(java.lang.String aReason)
Creates a new TransducerException instance with the specified reason for the exception.
Parameters:
aReason - the reason for this TransducerException to be thrown.

TransducerException

public TransducerException(java.lang.Exception aException)
Creates a new TransducerException instance with the specified reason for the exception.
Parameters:
aException - the exception for this TransducerException to be thrown.

TransducerException

public TransducerException(java.lang.String aReason,
                           java.util.Collection aExceptions)
Creates a new TransducerException instance with the specified reason for the exception and a Collection of Exception instances that caused this TransducerException instance to be thrown.
Parameters:
aReason - the reason for this TransducerException instance to be thrown.
aExceptions - the list of Exception instances thrown to cause this TransducerException instance.
Method Detail

addException

public void addException(java.lang.Exception aException)
Adds a new Exception instance to this TransducerException instance.
Parameters:
aException - an Exception instance that justifies this TransducerException instance.

getExceptions

public java.util.Collection getExceptions()
Returns the Collection of Exception instances that justifiy this TransducerException instance.

printStackTrace

public void printStackTrace()
Overrides the default printStackTrace() to allow proper printing of this composite exception.
Overrides:
printStackTrace in class java.lang.Throwable


Copyright 2002 Free Software Foundation. All Rights Reserved.