public class InitializationException extends PortalException
During startup, this various IInitializable
s are initialized by the PortalSystem
.
If an exception occurrs an InitializationException is thrown. The author of the IInitializable
decides whether the system can recover.
If it can, an InitializationException
is thrown with the paramater RECOVERABLE_ERROR
. This implies that even
though the object wasn't successfully initialized, the system as a whole can still continue to initialize. Otherwise,
an InitializationException
is thrown with the paramater NON_RECOVERABLE_ERROR
.
IInitializable
,
Serialized FormPortalException.IPortalExceptionDelegate
Modifier and Type | Field and Description |
---|---|
protected int |
m_errorState |
static int |
NON_RECOVERABLE_ERROR
Initialization must stop
|
static int |
RECOVERABLE_ERROR
The system can continue to initialize
|
static int |
UNKNOWN_ERROR
This is a recoverable error, but the cause isn't known
|
CURRENT_ERROR_LIST, EXCEPTION_DELEGATE_CLASS_NAME, logger, m_context, m_errorList, m_ignoreTargetMessage, m_isExpected, m_isLocalizable, m_messageArgs, m_messageInfo, m_messageKey, m_resBundleClass, m_target, s_portalExceptionDelegate
Constructor and Description |
---|
InitializationException(Class<? extends ResourceBundle> resourceBundleClass,
String messageKey,
Object[] messageArgs,
int errorState) |
InitializationException(int errorState)
Deprecated.
use a construtor that provides a localized reason for the error
|
InitializationException(Throwable target)
By default, this is created with
NON_RECOVERABLE_ERROR |
InitializationException(Throwable t,
Class<? extends ResourceBundle> resourceBundleClass,
String messageKey,
Object[] messageArgs,
int errorState) |
InitializationException(Throwable target,
int errorState) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRecover()
Based on
getErrorState() we may or may not be able to recover |
int |
getErrorState()
The error level
|
static InitializationException |
reuseOrWrap(Throwable target)
This will either construct a new InitializationException, wrapping the target or
just return the target if it already is an instance of InitializationException.
|
static InitializationException |
reuseOrWrap(Throwable target,
int errorState)
This will either construct a new InitializationException, wrapping the target or
just return the target if it already is an instance of InitializationException.
|
addDetailsMesasge, addDetailsMessage, checkExpected, getCause, getContext, getErrorList, getErrorList, getGlobalProvider, getLocalizedMessage, getMessage, getMessageKey, getTargetException, getTLS, initDetailsMessage, isExpected, notImplemented, printFullStackTrace, printFullStackTrace, printStackTrace, printStackTrace, printStackTrace, putTLS, removeTLS, reset, reuseOrWrapException, setContext, setExpected, setIgnoreTargetMessage
addSuppressed, fillInStackTrace, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public static final int UNKNOWN_ERROR
public static final int RECOVERABLE_ERROR
public static final int NON_RECOVERABLE_ERROR
protected int m_errorState
@Deprecated public InitializationException(int errorState)
errorState
- either RECOVERABLE_ERROR
or NON_RECOVERABLE_ERROR
public InitializationException(Throwable t, Class<? extends ResourceBundle> resourceBundleClass, String messageKey, Object[] messageArgs, int errorState)
errorState
- either RECOVERABLE_ERROR
or NON_RECOVERABLE_ERROR
public InitializationException(Class<? extends ResourceBundle> resourceBundleClass, String messageKey, Object[] messageArgs, int errorState)
errorState
- either RECOVERABLE_ERROR
or NON_RECOVERABLE_ERROR
public InitializationException(Throwable target)
NON_RECOVERABLE_ERROR
target
- the wrapped exception. see PortalException.getTargetException()
public InitializationException(Throwable target, int errorState)
target
- the wrapped exception. see PortalException.getTargetException()
errorState
- either RECOVERABLE_ERROR
or NON_RECOVERABLE_ERROR
public static InitializationException reuseOrWrap(Throwable target)
NON_RECOVERABLE_ERROR
.target
- the wrapped exception. see PortalException.getTargetException()
public static InitializationException reuseOrWrap(Throwable target, int errorState)
NON_RECOVERABLE_ERROR
.target
- the wrapped exception. see PortalException.getTargetException()
errorState
- either RECOVERABLE_ERROR
or NON_RECOVERABLE_ERROR
public int getErrorState()
RECOVERABLE_ERROR
or NON_RECOVERABLE_ERROR
public boolean canRecover()
getErrorState()
we may or may not be able to recover