org.teiid.core
Class TeiidRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.teiid.core.TeiidRuntimeException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DataNotAvailableException, PropertiesUtils.InvalidPropertyException, QueryProcessor.ExpiredTimeSliceException

public class TeiidRuntimeException
extends 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 String CAUSED_BY_STRING
           
static long serialVersionUID
           
 
Constructor Summary
TeiidRuntimeException()
          Construct a default instance of this class.
TeiidRuntimeException(String message)
          Construct an instance with the specified error message.
TeiidRuntimeException(String code, String message)
           
TeiidRuntimeException(Throwable e)
          Construct an instance with a linked exception specified.
TeiidRuntimeException(Throwable e, String message)
          Construct an instance with the linked exception and error message specified.
TeiidRuntimeException(Throwable e, String code, String message)
          Construct an instance with the linked exception, error code, and error message specified.
 
Method Summary
 Throwable getChild()
          Deprecated. use Throwable.getCause() instead
 String getCode()
          Get the error code.
 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 String CAUSED_BY_STRING
Constructor Detail

TeiidRuntimeException

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


TeiidRuntimeException

public TeiidRuntimeException(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

TeiidRuntimeException

public TeiidRuntimeException(String code,
                             String message)

TeiidRuntimeException

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

Parameters:
e - An exception to chain to this exception

TeiidRuntimeException

public TeiidRuntimeException(Throwable e,
                             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 TeiidException 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

TeiidRuntimeException

public TeiidRuntimeException(Throwable e,
                             String code,
                             String message)
Construct an instance with the linked exception, error code, and error message specified. If the specified exception is a TeiidException 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

getChild

public Throwable getChild()
Deprecated. use Throwable.getCause() instead

Get the exception which is linked to this exception.

Returns:
The linked exception

getCode

public String getCode()
Get the error code.

Returns:
The error code

toString

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

Overrides:
toString in class Throwable
Returns:
String representation of instance


Copyright © 2012. All Rights Reserved.