Package de.aristaflow.ilm.util
Class IlmException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- de.aristaflow.ilm.util.IlmException
-
- All Implemented Interfaces:
de.aristaflow.adept2.model.communication.webservice.StackSuppressingException
,Serializable
- Direct Known Subclasses:
AbortServiceException
,AbortTransactionException
,AgentUnknownException
,AuthenticationException
,DataConsistencyException
,DataSourceException
,IncompatibleGuiContextException
,InterruptException
,InvalidActivityStateException
,InvalidDataContainerException
,InvalidInstanceStateException
,InvalidTemplateStateException
,LockException
,OrgModelException
,ParameterException
,PasswordPolicyException
,PlainTextException
,PolicyResolutionException
,ScriptException
,UnknownSessionException
,WrappingException
,WrongAgentException
,WrongRuntimeManagerException
,XPathEvaluationException
public class IlmException extends Exception implements de.aristaflow.adept2.model.communication.webservice.StackSuppressingException
This class provides the means to allow serialisation frameworks to (de-)serialise exceptions with all required information properly. Additionally, it allows for deserialising instances of the corresponding subclasses properly. Stack traces can be suppressed and unrequired fields ofThrowable
are hidden to avoid too much data.- See Also:
Exception
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description String
causeClass
The class of the cause of the exception ornull
.@NotBlank String
message
The message of the exception.UUID
serverLogId
The ID of the corresponding message in the server log.@NotBlank String
subClass
This is used by Jackson for deserialising subclasses.@NotNull Boolean
suppressStack
Whether to suppress the stack trace when serialising this exception.
-
Constructor Summary
Constructors Modifier Constructor Description IlmException()
The constructor required for bean deserialisation.protected
IlmException(String message)
protected
IlmException(String message, Throwable cause, StackTraceElement[] stackTrace)
protected
IlmException(Throwable replaced)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwable
getCause()
@NotNull List<IlmStackTraceElement>
getIlmStackTrace()
Gets the stack trace similar togetIlmStackTrace()
but as ILM representation.String
getLocalizedMessage()
UUID
getLogId()
String
getMessage()
Overridden to get the actual message.StackTraceElement[]
getStackTrace()
void
setLogId(UUID serverLogId)
void
setStackTrace(StackTraceElement[] stackTrace)
void
setSuppressStack(boolean suppressStack)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, toString
-
-
-
-
Field Detail
-
subClass
@NotBlank public @NotBlank String subClass
This is used by Jackson for deserialising subclasses.
-
message
@NotBlank public @NotBlank String message
The message of the exception.- See Also:
Throwable.getMessage()
-
causeClass
public String causeClass
The class of the cause of the exception ornull
.- See Also:
Throwable.getCause()
-
serverLogId
public UUID serverLogId
The ID of the corresponding message in the server log. The most significant bits is the timestamp in millis of the corresponding log entry, the least significant bits are a random long.
This will benull
for exceptions that are normal return values. In all exceptional cases this will be a valid and non-null
UUID.
-
suppressStack
@NotNull public @NotNull Boolean suppressStack
Whether to suppress the stack trace when serialising this exception.- See Also:
Throwable.getStackTrace()
-
-
Constructor Detail
-
IlmException
public IlmException()
The constructor required for bean deserialisation.
-
IlmException
protected IlmException(String message)
-
IlmException
protected IlmException(Throwable replaced)
-
IlmException
protected IlmException(String message, Throwable cause, StackTraceElement[] stackTrace)
-
-
Method Detail
-
getLogId
public UUID getLogId()
- Specified by:
getLogId
in interfacede.aristaflow.adept2.model.communication.webservice.StackSuppressingException
-
setLogId
public void setLogId(UUID serverLogId)
- Specified by:
setLogId
in interfacede.aristaflow.adept2.model.communication.webservice.StackSuppressingException
-
setSuppressStack
public void setSuppressStack(boolean suppressStack)
- Specified by:
setSuppressStack
in interfacede.aristaflow.adept2.model.communication.webservice.StackSuppressingException
-
getMessage
public String getMessage()
Overridden to get the actual message. Otherwise the method (of the superclass) will be preferred over the public field when serialising thus leading to the wrong message.- Overrides:
getMessage
in classThrowable
-
getIlmStackTrace
@NotNull public @NotNull List<IlmStackTraceElement> getIlmStackTrace()
Gets the stack trace similar togetIlmStackTrace()
but as ILM representation. If the stack is suppressed, an empty list will be returned.- Returns:
- The ILM representation of the stack trace or the empty list when suppressed.
-
getStackTrace
public StackTraceElement[] getStackTrace()
- Overrides:
getStackTrace
in classThrowable
-
setStackTrace
public void setStackTrace(StackTraceElement[] stackTrace)
- Overrides:
setStackTrace
in classThrowable
-
getLocalizedMessage
public String getLocalizedMessage()
- Overrides:
getLocalizedMessage
in classThrowable
-
-