public class MXExceptionMediator
extends java.lang.Object
| Constructor and Description |
|---|
MXExceptionMediator() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getMessage(java.lang.Throwable throwable,
java.lang.String langCode)
Retrieves the localized/translated exception message for the specified exception and language code.
|
static void |
registerExceptionAdapter(java.lang.Class<? extends java.lang.Exception> exceptionClass,
MXExceptionAdapter exceptionAdapter)
Registers a new MXExceptionAdapter with MXExceptionMediator.
|
static MXException |
toMXException(java.lang.Throwable throwable)
Converts the specified exception into an MXException.
|
static void |
unregisterExceptionAdapter(java.lang.Class<? extends java.lang.Exception> exceptionClass)
Unregisters an MXExceptionAdapter
|
public static void registerExceptionAdapter(java.lang.Class<? extends java.lang.Exception> exceptionClass,
MXExceptionAdapter exceptionAdapter)
throws MXException
exceptionClass - The exception class handled by the specified MXExceptionAdapterexceptionAdapter - The new MXExceptionAdapterMXExceptionpublic static void unregisterExceptionAdapter(java.lang.Class<? extends java.lang.Exception> exceptionClass)
throws MXException
exceptionClass - The exception class handled by the MXExceptionAdapter to be unregisteredMXExceptionpublic static java.lang.String getMessage(java.lang.Throwable throwable,
java.lang.String langCode)
throwable - The exception for which to retrieve the message.langCode - The Maximo language code for which to retrieve the message.public static MXException toMXException(java.lang.Throwable throwable)
throwable - The exception to be converted.