Пример #1
0
 protected void traceFailure(final Throwable reason) {
   if (Exceptions.isEarlyFinish(reason)) {
     _shallowTraceBuilder.setResultType(ResultType.EARLY_FINISH);
   } else {
     _shallowTraceBuilder.setResultType(ResultType.ERROR);
     _shallowTraceBuilder.setValue(Exceptions.failureToString(reason));
   }
 }
Пример #2
0
 private void traceDone(final T value) {
   _shallowTraceBuilder.setResultType(ResultType.SUCCESS);
   final Function<T, String> traceValueProvider = _traceValueProvider;
   if (traceValueProvider != null) {
     try {
       _shallowTraceBuilder.setValue(traceValueProvider.apply(value));
     } catch (Exception e) {
       _shallowTraceBuilder.setValue(Exceptions.failureToString(e));
     }
   }
 }