Class InitializationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.webmethods.portal.PortalException
com.webmethods.portal.system.init.InitializationException
- All Implemented Interfaces:
IPortalException
,Serializable
- Direct Known Subclasses:
RtlInitException
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
.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.webmethods.portal.PortalException
PortalException.IPortalExceptionDelegate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
static final int
Initialization must stopstatic final int
The system can continue to initializestatic final int
This is a recoverable error, but the cause isn't knownFields inherited from class com.webmethods.portal.PortalException
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 Summary
ConstructorsConstructorDescriptionInitializationException
(int errorState) Deprecated.use a construtor that provides a localized reason for the errorInitializationException
(Class<? extends ResourceBundle> resourceBundleClass, String messageKey, Object[] messageArgs, int errorState) InitializationException
(Throwable target) By default, this is created withNON_RECOVERABLE_ERROR
InitializationException
(Throwable target, int errorState) InitializationException
(Throwable t, Class<? extends ResourceBundle> resourceBundleClass, String messageKey, Object[] messageArgs, int errorState) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Based ongetErrorState()
we may or may not be able to recoverint
The error levelstatic 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.Methods inherited from class com.webmethods.portal.PortalException
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
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Field Details
-
UNKNOWN_ERROR
public static final int UNKNOWN_ERRORThis is a recoverable error, but the cause isn't known- See Also:
-
RECOVERABLE_ERROR
public static final int RECOVERABLE_ERRORThe system can continue to initialize- See Also:
-
NON_RECOVERABLE_ERROR
public static final int NON_RECOVERABLE_ERRORInitialization must stop- See Also:
-
m_errorState
protected int m_errorState
-
-
Constructor Details
-
InitializationException
Deprecated.use a construtor that provides a localized reason for the error- Parameters:
errorState
- eitherRECOVERABLE_ERROR
orNON_RECOVERABLE_ERROR
-
InitializationException
public InitializationException(Throwable t, Class<? extends ResourceBundle> resourceBundleClass, String messageKey, Object[] messageArgs, int errorState) - Parameters:
errorState
- eitherRECOVERABLE_ERROR
orNON_RECOVERABLE_ERROR
-
InitializationException
public InitializationException(Class<? extends ResourceBundle> resourceBundleClass, String messageKey, Object[] messageArgs, int errorState) - Parameters:
errorState
- eitherRECOVERABLE_ERROR
orNON_RECOVERABLE_ERROR
-
InitializationException
By default, this is created withNON_RECOVERABLE_ERROR
- Parameters:
target
- the wrapped exception. seePortalException.getTargetException()
-
InitializationException
- Parameters:
target
- the wrapped exception. seePortalException.getTargetException()
errorState
- eitherRECOVERABLE_ERROR
orNON_RECOVERABLE_ERROR
-
-
Method Details
-
reuseOrWrap
This will either construct a new InitializationException, wrapping the target or just return the target if it already is an instance of InitializationException. By default, if a new InitializationException is created, it will be withNON_RECOVERABLE_ERROR
.- Parameters:
target
- the wrapped exception. seePortalException.getTargetException()
- Returns:
- nothing, an exception be will be thrown
-
reuseOrWrap
This will either construct a new InitializationException, wrapping the target or just return the target if it already is an instance of InitializationException. By default, if a new InitializationException is created, it will be withNON_RECOVERABLE_ERROR
.- Parameters:
target
- the wrapped exception. seePortalException.getTargetException()
errorState
- eitherRECOVERABLE_ERROR
orNON_RECOVERABLE_ERROR
- Returns:
- nothing, an exception be will be thrown
-
getErrorState
public int getErrorState()The error level- Returns:
- either
RECOVERABLE_ERROR
orNON_RECOVERABLE_ERROR
-
canRecover
public boolean canRecover()Based ongetErrorState()
we may or may not be able to recover- Returns:
- true if you can recover, false otherwise
-