Package org.teiid.core
Class TeiidRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.teiid.core.TeiidRuntimeException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DataNotAvailableException
,MetadataException
,PropertiesUtils.InvalidPropertyException
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
Fields Modifier and Type Field Description static String
CAUSED_BY_STRING
static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description TeiidRuntimeException()
Construct a default instance of this class.TeiidRuntimeException(String message)
Construct an instance with the specified error message.TeiidRuntimeException(Throwable e)
Construct an instance with a linked exception specified.TeiidRuntimeException(BundleUtil.Event code, String message)
TeiidRuntimeException(BundleUtil.Event code, Throwable t)
TeiidRuntimeException(BundleUtil.Event event, Throwable e, String message)
Construct an instance with the linked exception, error code, and error message specified.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCode()
Get the error code.String
getMessage()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
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(BundleUtil.Event code, String message)
-
TeiidRuntimeException
public TeiidRuntimeException(BundleUtil.Event code, Throwable t)
-
TeiidRuntimeException
public TeiidRuntimeException(Throwable e)
Construct an instance with a linked exception specified. If the exception is aTeiidException
or a TeoodRuntimeException, then the code will be set to the exception's code.- Parameters:
e
- An exception to chain to this exception
-
TeiidRuntimeException
public TeiidRuntimeException(BundleUtil.Event event, Throwable e, String message)
Construct an instance with the linked exception, error code, and error message specified. If the specified exception is aTeiidException
or a MetaMatrixRuntimeException, the code will be set to the exception's code.- Parameters:
e
- The exception to chain to this exceptionevent
- The error codemessage
- The error message
-
-
Method Detail
-
getCode
public String getCode()
Get the error code.- Returns:
- The error code
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
-