use of com.netflix.spinnaker.kork.api.exceptions.ExceptionSummary.TraceDetail.TraceDetailBuilder in project kork by spinnaker.
the class ExceptionSummaryService method createTraceDetail.
private TraceDetail createTraceDetail(Throwable throwable, @Nullable ExceptionDetails exceptionDetails) {
TraceDetailBuilder detailBuilder = TraceDetail.builder().message(throwable.getMessage());
if (throwable instanceof SpinnakerException) {
SpinnakerException spinnakerException = (SpinnakerException) throwable;
detailBuilder.userMessage(exceptionMessageDecorator.decorate(throwable, spinnakerException.getUserMessage(), exceptionDetails)).retryable(spinnakerException.getRetryable());
}
if (throwable instanceof HasAdditionalAttributes) {
detailBuilder.additionalAttributes(((HasAdditionalAttributes) throwable).getAdditionalAttributes());
}
return detailBuilder.build();
}
Aggregations