Package com.imc.context
Class IMCException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.imc.context.IMCException
- All Implemented Interfaces:
Serializable
The base class of all exceptions in IMC Product, the methods can throw this
exception XXX use builder for instantiation???
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIMCException(String message) IMCException(String errorCode, String message) IMCException(Throwable cause, String message) IMCException(Throwable cause, String ec, boolean recoverable, Object... args) IMCException(Throwable cause, String ec, boolean recoverable, String message, Object... args) IMCException(Throwable cause, String message, String errorCode) -
Method Summary
Modifier and TypeMethodDescriptionObject[]Error code is mandatory so is ensured to be non null.booleanvoidprint()voidsetAdditionalErrors(List<String> additionalErrors) static IMCExceptionWraps the given exception in a newIMCExceptionwith internal error code or returns the exception as is in case it is already aIMCException.static IMCExceptionWraps the given exception in a newIMCExceptionwith internal error code or returns the exception as is in case it is already aIMCException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IMCException
-
IMCException
-
IMCException
-
IMCException
-
IMCException
-
IMCException
-
-
Method Details
-
wrap
Wraps the given exception in a newIMCExceptionwith internal error code or returns the exception as is in case it is already aIMCException.- Parameters:
cause- the exception to wrap- Returns:
- a new
IMCExceptionor the original exception in case it is already aIMCException
-
wrap
Wraps the given exception in a newIMCExceptionwith internal error code or returns the exception as is in case it is already aIMCException.- Parameters:
cause- the exception to wrap- Returns:
- a new
IMCExceptionor the original exception in case it is already aIMCException
-
getAdditionalErrors
-
getArguments
-
getErrorCode
Error code is mandatory so is ensured to be non null. -
isRecoverable
public boolean isRecoverable() -
print
public void print() -
setAdditionalErrors
-