diff options
Diffstat (limited to 'src/main/scala/xyz/driver/core/trace')
-rw-r--r-- | src/main/scala/xyz/driver/core/trace/ExceptionLoggingSizedBufferingTraceConsumer.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/core/trace/ExceptionLoggingSizedBufferingTraceConsumer.scala b/src/main/scala/xyz/driver/core/trace/ExceptionLoggingSizedBufferingTraceConsumer.scala index 64ae15a..fd3a843 100644 --- a/src/main/scala/xyz/driver/core/trace/ExceptionLoggingSizedBufferingTraceConsumer.scala +++ b/src/main/scala/xyz/driver/core/trace/ExceptionLoggingSizedBufferingTraceConsumer.scala @@ -19,8 +19,8 @@ class ExceptionLoggingFlushableTraceConsumer(traceConsumer: FlushableTraceConsum log.error(s"Encountered exception logging to google $exception") override def receive(trace: Traces): Unit = - Try(flushableTraceConsumer.receive(trace)).fold(exceptionLogger, identity) + Try(flushableTraceConsumer.receive(trace)).recover({case e => exceptionLogger(e)}).get override def flush(): Unit = - Try(flushableTraceConsumer.flush()).fold(exceptionLogger, identity) + Try(flushableTraceConsumer.flush()).recover({case e => exceptionLogger(e)}).get } |