public StatusDetails withTrace(String value) { setTrace(value); return this; }
public StatusDetails withTrace(String value) { setTrace(value); return this; }
/** * @deprecated use set method */ @Deprecated public StatusDetails withTrace(final String value) { return setTrace(value); } }
public static Optional<StatusDetails> getStatusDetails(final Throwable e) { return Optional.ofNullable(e) .map(throwable -> new StatusDetails() .setMessage(Optional.ofNullable(throwable.getMessage()).orElse(throwable.getClass().getName())) .setTrace(getStackTraceAsString(throwable))); }