public class ErrorRuntimeException extends LspsRuntimeException implements IErrorException
ErrorException
.Constructor and Description |
---|
ErrorRuntimeException(ErrorException e)
Creates new instance.
|
ErrorRuntimeException(String errorCode)
Creates new instance.
|
ErrorRuntimeException(String errorCode,
String message)
Creates new instance.
|
ErrorRuntimeException(String errorCode,
String message,
Throwable cause)
Creates new instance.
|
ErrorRuntimeException(String errorCode,
Throwable cause)
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 if contextId not exists.
|
void |
addContexts(List<ErrorContext> contexts)
Adds all contexts.
|
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() |
getModelInstanceStates, setModelInstanceStates
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ErrorRuntimeException(ErrorException e)
e
- public ErrorRuntimeException(String errorCode)
errorCode
- the error codepublic ErrorRuntimeException(String errorCode, String message)
errorCode
- the error codemessage
- the messagepublic ErrorRuntimeException(String errorCode, Throwable cause)
errorCode
- the error codecause
- the causepublic String getErrorCode()
IErrorException
getErrorCode
in interface IErrorException
public String getBareMessage()
IErrorException
getBareMessage
in interface IErrorException
public List<ErrorContext> getContexts()
IErrorException
getContexts
in interface IErrorException
public ErrorContext findContext(String id)
findContext
in interface IErrorException
null
if not foundpublic void addContext(String contextId, String context)
contextId
- the context idcontext
- the exception contextpublic void addContextIfIdNotExists(String contextId, String context)
contextId
- context
- public void addContexts(List<ErrorContext> contexts)
contexts
- public String getMessage()
getMessage
in class Throwable
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.