com.metamatrix.api.exception
Class MetaMatrixException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.metamatrix.core.MetaMatrixCoreException
              extended by com.metamatrix.api.exception.MetaMatrixException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConfigObjectsNotResolvableException, CryptoException, DBIDGeneratorException, DbWriterException, ExternalException, InvalidConfigurationElementException, InvalidRequestException, LogConfigurationException, ManagedConnectionException, MemoryNotAvailableException, MessagingException, MetaMatrixComponentException, MetaMatrixProcessingException, ModificationException, SourceWarning, TransactionException, TransformationException, TreeNodeException, XMLTranslationException

public class MetaMatrixException
extends MetaMatrixCoreException

A generic exception which contains a reference to another exception. This class can be used to maintain a linked list of exceptions.

Subclasses of this exception typically only need to implement whatever constructors they need.

This class assumes all messages internationalization has been resolved before the constructor is called. There will be no automatic lookup performed by this class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.metamatrix.core.MetaMatrixCoreException
code
 
Constructor Summary
MetaMatrixException()
          No-arg Constructor
MetaMatrixException(java.lang.String message)
          Construct an instance with the specified error message.
MetaMatrixException(java.lang.String code, java.lang.String message)
          Construct an instance with the specified error code and message.
MetaMatrixException(java.lang.Throwable e)
          Construct an instance with a linked exception specified.
MetaMatrixException(java.lang.Throwable e, java.lang.String message)
          Construct an instance with the linked exception and error message specified.
MetaMatrixException(java.lang.Throwable e, java.lang.String code, java.lang.String message)
          Construct an instance with the linked exception, error code, and error message specified.
 
Method Summary
 java.lang.Throwable getChild()
          Get the exception which is linked to this exception.
 java.lang.String getFullMessage()
          Get the full error message, including any message(s) from child exceptions.
 java.lang.String toString()
          Returns a string representation of this class.
 
Methods inherited from class com.metamatrix.core.MetaMatrixCoreException
getCode, getMessage
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaMatrixException

public MetaMatrixException()
No-arg Constructor


MetaMatrixException

public MetaMatrixException(java.lang.String message)
Construct an instance with the specified error message.

Parameters:
message - The error message

MetaMatrixException

public MetaMatrixException(java.lang.String code,
                           java.lang.String message)
Construct an instance with the specified error code and message.

Parameters:
code - The error code
message - The error message

MetaMatrixException

public MetaMatrixException(java.lang.Throwable e)
Construct an instance with a linked exception specified. If the exception is a MetaMatrixException or a MetaMatrixRuntimeException, then the code will be set to the exception's code.

Parameters:
e - An exception to chain to this exception

MetaMatrixException

public MetaMatrixException(java.lang.Throwable e,
                           java.lang.String message)
Construct an instance with the linked exception and error message specified. If the exception is a MetaMatrixException or a MetaMatrixRuntimeException, then the code will be set to the exception's code.

Parameters:
e - The exception to chain to this exception
message - The error message

MetaMatrixException

public MetaMatrixException(java.lang.Throwable e,
                           java.lang.String code,
                           java.lang.String message)
Construct an instance with the linked exception, error code, and error message specified. If the exception is a MetaMatrixException or a MetaMatrixRuntimeException, then the code will be set to the exception's code.

Parameters:
e - The exception to chain to this exception
code - The error code
message - The error message
Method Detail

getChild

public java.lang.Throwable getChild()
Get the exception which is linked to this exception.

Returns:
The linked exception

getFullMessage

public java.lang.String getFullMessage()
Get the full error message, including any message(s) from child exceptions. Messages of any exceptions chained to this exception are prepended with their "level" in the chain.

Returns:
The full error message
See Also:
getFormattedMessage(java.lang.Throwable, int)

toString

public java.lang.String toString()
Returns a string representation of this class.

Overrides:
toString in class java.lang.Throwable
Returns:
String representation of instance


Copyright © 2009. All Rights Reserved.