public class ErrorException extends LspsException implements IErrorException
| Modifier and Type | Field and Description |
|---|---|
static String |
MODEL_CONTEXT
Key for model context
|
static String |
MODEL_INSTANCE_CONTEXT
Key for model instance context
|
| Constructor and Description |
|---|
ErrorException(ErrorRuntimeException e)
Creates new instance.
|
ErrorException(ErrorRuntimeException e,
String[] stackTraceInfo)
Creates new instance.
|
ErrorException(String errorCode)
Creates new instance.
|
ErrorException(String errorCode,
String message)
Creates new instance.
|
ErrorException(String errorCode,
String[] stackTraceInfo)
Creates new instance.
|
ErrorException(String errorCode,
String message,
String[] stackTraceInfo)
Creates new instance.
|
ErrorException(String errorCode,
String message,
String[] stackTraceInfo,
String contextId,
String context)
Creates new instance.
|
ErrorException(String errorCode,
String message,
Throwable cause)
Creates new instance.
|
ErrorException(String errorCode,
String message,
Throwable cause,
String[] stackTraceInfo)
Creates new instance.
|
ErrorException(String errorCode,
Throwable cause)
Creates new instance.
|
ErrorException(String errorCode,
Throwable cause,
String[] stackTraceInfo)
Creates new instance.
|
ErrorException(String errorCode,
Throwable cause,
String contextId,
String context)
Creates new instance.
|
ErrorException(String errorCode,
Throwable cause,
String contextId,
String context,
String[] stackTraceInfo)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContext(String contextId,
String context)
Adds a context.
|
void |
addContextIfIdNotExists(String contextId,
String context)
Adds a context of there is no context with a given contextId already.
|
void |
addContexts(List<ErrorContext> contexts)
Adds all contexts.
|
void |
addModelContext(long modelId)
Adds context of model.
|
void |
addModelInstanceContext(long modelInstanceId)
Adds context on model instance.
|
ErrorContext |
findContext(String id) |
String |
getBareMessage()
Returns the message in the bare form (without the error code part).
|
List<ErrorContext> |
getContexts()
Returns contexts in which exception occurs.
|
String |
getErrorCode()
Returns the error code.
|
String |
getMessage() |
String[] |
getStackTraceInfo() |
static ErrorException |
wrap(Exception e)
Wraps the given exception into a proper
ErrorException. |
static ErrorException |
wrap(Exception e,
String[] stackTraceInfo)
Wraps the given exception into a proper
ErrorException. |
static ErrorException |
wrap(Exception e,
String contextId,
String context)
Wraps the given exception into a proper
ErrorException. |
static ErrorException |
wrap(Exception e,
String contextId,
String context,
String[] stackTraceInfo)
Wraps the given exception into a proper
ErrorException. |
getModelInstanceStates, setModelInstanceStatesaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final String MODEL_INSTANCE_CONTEXT
public static final String MODEL_CONTEXT
public ErrorException(String errorCode)
errorCode - the error codepublic ErrorException(String errorCode, String[] stackTraceInfo)
errorCode - the error codestackTraceInfo - the stack tracepublic ErrorException(String errorCode, String message)
errorCode - the error codemessage - the messagepublic ErrorException(String errorCode, String message, String[] stackTraceInfo)
errorCode - the error codemessage - the messagestackTraceInfo - the stack tracepublic ErrorException(String errorCode, String message, String[] stackTraceInfo, String contextId, String context)
errorCode - the error codemessage - the messagestackTraceInfo - the stack tracecontextId - context - public ErrorException(String errorCode, Throwable cause)
errorCode - the error codecause - the causepublic ErrorException(String errorCode, Throwable cause, String[] stackTraceInfo)
errorCode - the error codecause - the causestackTraceInfo - the stack tracepublic ErrorException(String errorCode, Throwable cause, String contextId, String context)
errorCode - the error codecause - the causecontextId - contextIdscontext - public ErrorException(String errorCode, Throwable cause, String contextId, String context, String[] stackTraceInfo)
errorCode - the error codecause - the causecontextId - contextIdscontext - stackTraceInfo - a stack tracepublic ErrorException(String errorCode, String message, Throwable cause)
errorCode - the error codemessage - the messagecause - the causepublic ErrorException(String errorCode, String message, Throwable cause, String[] stackTraceInfo)
errorCode - the error codemessage - the messagecause - the causestackTraceInfo - the stack tracepublic ErrorException(ErrorRuntimeException e)
e - public ErrorException(ErrorRuntimeException e, String[] stackTraceInfo)
e - stackTraceInfo - public String[] getStackTraceInfo()
public String getErrorCode()
IErrorExceptiongetErrorCode in interface IErrorExceptionpublic String getBareMessage()
IErrorExceptiongetBareMessage in interface IErrorExceptionpublic List<ErrorContext> getContexts()
IErrorExceptiongetContexts in interface IErrorExceptionpublic ErrorContext findContext(String id)
findContext in interface IErrorExceptionnull if not foundpublic static ErrorException wrap(Exception e, String contextId, String context)
ErrorException.e - contextId - context - public static ErrorException wrap(Exception e, String contextId, String context, String[] stackTraceInfo)
ErrorException.e - contextId - context - stackTraceInfo - public void addContextIfIdNotExists(String contextId, String context)
contextId - context - public static ErrorException wrap(Exception e)
ErrorException.e - public static ErrorException wrap(Exception e, String[] stackTraceInfo)
ErrorException.e - stackTraceInfo - public void addContext(String contextId, String context)
contextId - the context idcontext - the exception contextpublic void addContexts(List<ErrorContext> contexts)
contexts - public void addModelInstanceContext(long modelInstanceId)
modelInstanceId - public void addModelContext(long modelId)
modelId - public String getMessage()
getMessage in class ThrowableCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.