public class RMRuntimeException
extends java.lang.RuntimeException
The Locale
used in generation of the RMRuntimeException's
message string is based on the value of the current thread's RMUserContext
.
The JarmLogger
locale determines how the exception message
is localized for purposes of error logging.
This differentiation ensures that all logging entry messages are based on the same
locale while the message attached to a RMRuntimeException
instance is based upon the locale of the current user, since the message is
displayed to that user.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IBM_PREFIX
The IBM Message Standard three-character prefix assigned to
IBM Enterprise Records products.
|
static java.lang.String |
MESSAGE_ID_PREFIX
The prefix string for all logging message ID key values.
|
static char |
MESSAGE_ID_SUFFIX
The Severity suffix character used for all
RMRuntimeException
Message IDs. |
static java.lang.String |
SWG_ID
The IBM SWG Component ID assigned to the IBM Enterprise Records API.
|
static java.lang.String |
W3C_DATE_FORMAT
A date format pattern string for the w3c date format standard.
|
static java.lang.String |
W3C_DATE_FORMAT_WITH_ZONE
A date format pattern string for the w3c date format standard that
includes time zone information.
|
Modifier and Type | Method and Description |
---|---|
static RMRuntimeException |
createRMRuntimeException(RMErrorCode code,
java.lang.Object... params)
Creates a new
RMRuntimeException instance. |
static RMRuntimeException |
createRMRuntimeException(RMErrorCode code,
RMErrorStack errorStack,
java.lang.Object... params)
Creates a new
RMRuntimeException instance. |
static RMRuntimeException |
createRMRuntimeException(java.lang.Throwable cause,
RMErrorCode code,
java.lang.Object... params)
Creates a new
RMRuntimeException instance. |
static RMRuntimeException |
createRMRuntimeException(java.lang.Throwable cause,
RMErrorCode code,
RMErrorStack errorStack,
java.lang.Object... params)
Creates a new
RMRuntimeException instance. |
static java.lang.String |
formatDate(java.util.Date dateValue)
Helper method to format a java.util.Date value as a
String for use
within an exception message. |
RMErrorCode |
getErrorCode()
Returns the
RMErrorCode associated with this exception. |
RMErrorStack |
getErrorStack()
Returns a repository-specific
RMErrorStack instance, if
any, that provides additional repository-related information concerning the exception. |
MessageInfo |
getMessageInfo()
Returns a
MessageInfo instance that provides various localized information strings
about this RMRuntimeException instance such as a detailed explanation and
suggested user action to resolve the exception issue. |
public static final java.lang.String IBM_PREFIX
public static final java.lang.String SWG_ID
public static final java.lang.String MESSAGE_ID_PREFIX
ResourceBundle
associated with this BaseLogger
instance.
Each message ID key value consists of this prefix string plus a 4-digit numeric suffix.
public static final char MESSAGE_ID_SUFFIX
RMRuntimeException
Message IDs.public static final java.lang.String W3C_DATE_FORMAT
public static final java.lang.String W3C_DATE_FORMAT_WITH_ZONE
public static RMRuntimeException createRMRuntimeException(RMErrorCode code, java.lang.Object... params)
RMRuntimeException
instance.code
- the RMErrorCode
value that
defines the cause of this exception. This entry cannot be null
.params
- optional exception message formatting parameters.RMRuntimeException
instance.public static RMRuntimeException createRMRuntimeException(RMErrorCode code, RMErrorStack errorStack, java.lang.Object... params)
RMRuntimeException
instance.code
- the RMErrorCode
value that
defines the cause of this exception. This entry cannot be null
.errorStack
- a RMErrorStack
containing
repository-specific error information. This entry can be null
.params
- optional exception message formatting parameters.RMRuntimeException
instance.public static RMRuntimeException createRMRuntimeException(java.lang.Throwable cause, RMErrorCode code, java.lang.Object... params)
RMRuntimeException
instance.cause
- the underlying cause for this exception.code
- the RMErrorCode
value that
defines the cause of this exception. This entry cannot be null
.params
- optional exception message formatting parameters.RMRuntimeException
instance.public static RMRuntimeException createRMRuntimeException(java.lang.Throwable cause, RMErrorCode code, RMErrorStack errorStack, java.lang.Object... params)
RMRuntimeException
instance.cause
- the underlying cause for this exception.code
- the RMErrorCode
value that
defines the cause of this exception. This entry cannot be null
.errorStack
- a RMErrorStack
containing
repository-specific error information. This entry can be null
.params
- optional exception message formatting parameters.RMRuntimeException
instance.public RMErrorCode getErrorCode()
RMErrorCode
associated with this exception.RMErrorCode
value.public RMErrorStack getErrorStack()
RMErrorStack
instance, if
any, that provides additional repository-related information concerning the exception.RMErrorStack
instance. This value can be null
.public MessageInfo getMessageInfo()
MessageInfo
instance that provides various localized information strings
about this RMRuntimeException
instance such as a detailed explanation and
suggested user action to resolve the exception issue.MessageInfo
instance.public static java.lang.String formatDate(java.util.Date dateValue)
String
for use
within an exception message.dateValue
- the java.util.Date
value to format. This entry can be null
.String
value.© Copyright IBM Corp. 2010, 2013. All Rights Reserved.