com.metamatrix.core
Class MetaMatrixRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.metamatrix.core.MetaMatrixRuntimeException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ExtensionModuleRuntimeException, PropertiesUtils.InvalidPropertyException, RemoteMessagingException, ServiceException

public class MetaMatrixRuntimeException
extends java.lang.RuntimeException

A generic runtime exception which contains a reference to another exception and which represents a condition that should never occur during runtime. 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.

See Also:
Serialized Form

Field Summary
static java.lang.String CAUSED_BY_STRING
           
static long serialVersionUID
           
 
Constructor Summary
MetaMatrixRuntimeException()
          Construct a default instance of this class.
MetaMatrixRuntimeException(int code, java.lang.String message)
          Construct an instance with the specified error code and message.
MetaMatrixRuntimeException(java.lang.String message)
          Construct an instance with the specified error message.
MetaMatrixRuntimeException(java.lang.String code, java.lang.String message)
           
MetaMatrixRuntimeException(java.lang.Throwable e)
          Construct an instance with a linked exception specified.
MetaMatrixRuntimeException(java.lang.Throwable e, int code, java.lang.String message)
          Construct an instance with the linked exception, error code, and error message specified.
MetaMatrixRuntimeException(java.lang.Throwable e, java.lang.String message)
          Construct an instance with the linked exception and error message specified.
MetaMatrixRuntimeException(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.
static java.lang.String getClassShortName(java.lang.Class cls)
          Utility method to get the name of a class, without package information.
 java.lang.String getCode()
          Get the error code.
 int getIntCode()
           
 void superPrintStackTrace(java.io.PrintStream output)
           
 void superPrintStackTrace(java.io.PrintWriter output)
           
 java.lang.String toString()
          Returns a string representation of this class.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

CAUSED_BY_STRING

public static final java.lang.String CAUSED_BY_STRING
Constructor Detail

MetaMatrixRuntimeException

public MetaMatrixRuntimeException()
Construct a default instance of this class.


MetaMatrixRuntimeException

public MetaMatrixRuntimeException(java.lang.String message)
Construct an instance with the specified error message. If the message is actually a key, the actual message will be retrieved from a resource bundle using the key, the specified parameters will be substituted for placeholders within the message, and the code will be set to the key.

Parameters:
message - The error message or a resource bundle key

MetaMatrixRuntimeException

public MetaMatrixRuntimeException(int code,
                                  java.lang.String message)
Construct an instance with the specified error code and message. If the message is actually a key, the actual message will be retrieved from a resource bundle using the key, and the specified parameters will be substituted for placeholders within the message.

Parameters:
code - The error code
message - The error message or a resource bundle key

MetaMatrixRuntimeException

public MetaMatrixRuntimeException(java.lang.String code,
                                  java.lang.String message)

MetaMatrixRuntimeException

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

Parameters:
e - An exception to chain to this exception

MetaMatrixRuntimeException

public MetaMatrixRuntimeException(java.lang.Throwable e,
                                  java.lang.String message)
Construct an instance with the linked exception and error message specified. If the message is actually a key, the error message will be retrieved from a resource bundle the key, and code will be set to that key. Otherwise, if the specified exception is a MetaMatrixCoreException or a MetaMatrixRuntimeException, the code will be set to the exception's code.

Parameters:
e - The exception to chain to this exception
message - The error message or a resource bundle key

MetaMatrixRuntimeException

public MetaMatrixRuntimeException(java.lang.Throwable e,
                                  int code,
                                  java.lang.String message)
Construct an instance with the linked exception, error code, and error message specified. If the message is actually a key, the error message will be retrieved from a resource bundle using the key.

Parameters:
e - The exception to chain to this exception
code - The error code
message - The error message or a resource bundle key

MetaMatrixRuntimeException

public MetaMatrixRuntimeException(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 specified exception is a MetaMatrixException or a MetaMatrixRuntimeException, 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

getClassShortName

public static java.lang.String getClassShortName(java.lang.Class cls)
Utility method to get the name of a class, without package information.

Parameters:
cls - The class to get the name of
Returns:
The name of the class, without package info

getChild

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

Returns:
The linked exception

getCode

public java.lang.String getCode()
Get the error code.

Returns:
The error code

getIntCode

public int getIntCode()

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

superPrintStackTrace

public void superPrintStackTrace(java.io.PrintStream output)

superPrintStackTrace

public void superPrintStackTrace(java.io.PrintWriter output)


Copyright © 2009. All Rights Reserved.