public class ErrorDetails extends EventDetails
Severity.ERROR.
An ErrorDetails always will report about the error code, error message and error scope of the event, and may report the stracktrace of a thrown Exception.
| Modifier and Type | Class and Description |
|---|---|
static class |
ErrorDetails.Builder<B extends ErrorDetails.Builder<B,E>,E extends ErrorDetails>
Builder helper for
ErrorDetails. |
static class |
ErrorDetails.KEYS
Enumeration of all keys for this map
|
| Modifier | Constructor and Description |
|---|---|
protected |
ErrorDetails(com.google.common.collect.ImmutableMap<AbiquoKey,java.lang.Object> map)
Creates the forwarding map using a copy of the given
ImmutableMap
map. |
| Modifier and Type | Method and Description |
|---|---|
static ErrorDetails.Builder<?,ErrorDetails> |
builder(AbiquoError error,
ErrorScope scope)
Returns a builder instance for
ErrorDetails with the required parameters
AbiquoError error and ErrorScope scope. |
static ErrorDetails.Builder<?,ErrorDetails> |
builder(AbiquoError error,
ErrorScope scope,
java.lang.Throwable stacktrace)
Returns a builder instance for
ErrorDetails with the required parameters
AbiquoError error and ErrorScope scope and the optional parameter stacktrace
of the Throwable. |
static ErrorDetails.Builder<?,ErrorDetails> |
builder(java.util.List<AbiquoError> errors,
ErrorScope scope)
Returns a builder instance for
ErrorDetails with the required parameters
AbiquoError errors and ErrorScope scope. |
static ErrorDetails.Builder<?,ErrorDetails> |
builder(java.util.List<AbiquoError> errors,
ErrorScope scope,
java.lang.Throwable stacktrace)
Returns a builder instance for
ErrorDetails with the required parameters
AbiquoError errors and ErrorScope scope and the optional parameter stacktrace
of the Throwable. |
static ErrorDetails.Builder<?,ErrorDetails> |
builder(java.lang.String code,
java.lang.String message,
java.lang.String scope)
Returns a builder instance for
ErrorDetails with the required parameters |
java.lang.String |
getCode() |
static java.lang.String |
getFormattedStracktrace(java.lang.Throwable throwable)
Extracts the stack trace elements and formatted them into a single string.
|
java.lang.String |
getMessage() |
java.lang.String |
getScope() |
java.lang.String |
getStacktrace() |
delegate, equals, getTransportMap, hashCodeclear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, valuesprotected ErrorDetails(com.google.common.collect.ImmutableMap<AbiquoKey,java.lang.Object> map)
ImmutableMap
map.
Must be a non-visible constructor to force the developer to use the ErrorDetails.Builder.
map - the immutable map to create the event detailspublic java.lang.String getCode()
public java.lang.String getMessage()
public java.lang.String getScope()
public java.lang.String getStacktrace()
public static ErrorDetails.Builder<?,ErrorDetails> builder(AbiquoError error, ErrorScope scope)
ErrorDetails with the required parameters
AbiquoError error and ErrorScope scope.error - the AbiquoError which has promoted the eventscope - the ErrorScope which has affected by the error of the eventErrorDetailspublic static ErrorDetails.Builder<?,ErrorDetails> builder(java.util.List<AbiquoError> errors, ErrorScope scope)
ErrorDetails with the required parameters
AbiquoError errors and ErrorScope scope.errors - the list of AbiquoError which have promoted the eventscope - the ErrorScope which has affected by the error of the eventErrorDetailspublic static ErrorDetails.Builder<?,ErrorDetails> builder(java.util.List<AbiquoError> errors, ErrorScope scope, java.lang.Throwable stacktrace)
ErrorDetails with the required parameters
AbiquoError errors and ErrorScope scope and the optional parameter stacktrace
of the Throwable.errors - the AbiquoError which have promoted the eventscope - the ErrorScope which has affected by the error of the eventstacktrace - of the Throwable which has caused the errorErrorDetailspublic static ErrorDetails.Builder<?,ErrorDetails> builder(AbiquoError error, ErrorScope scope, java.lang.Throwable stacktrace)
ErrorDetails with the required parameters
AbiquoError error and ErrorScope scope and the optional parameter stacktrace
of the Throwable.error - the AbiquoError which has promoted the eventscope - the ErrorScope which has affected by the error of the eventstacktrace - of the Throwable which has caused the errorErrorDetailspublic static ErrorDetails.Builder<?,ErrorDetails> builder(java.lang.String code, java.lang.String message, java.lang.String scope)
ErrorDetails with the required parameterscode - the code of an abiquo api errormessage - the message an abiquo api errorscope - the stacktrace generated by the errorErrorDetailspublic static java.lang.String getFormattedStracktrace(java.lang.Throwable throwable)
throwable - with a stacktrace or not.Copyright © 2008-2020 Abiquo Holdings S.L.. All Rights Reserved.