From 01e43c3edbde026bf1a3b6ede2ea15fb79b5b437 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Mon, 28 Nov 2011 17:08:10 +0100 Subject: [PATCH] Use scala.util.control.NoStackTrace --- akka-actor/src/main/scala/akka/event/Logging.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/akka-actor/src/main/scala/akka/event/Logging.scala b/akka-actor/src/main/scala/akka/event/Logging.scala index af3fc25797..bae930cb17 100644 --- a/akka-actor/src/main/scala/akka/event/Logging.scala +++ b/akka-actor/src/main/scala/akka/event/Logging.scala @@ -14,6 +14,7 @@ import akka.actor.Timeout import akka.dispatch.FutureTimeoutException import java.util.concurrent.atomic.AtomicInteger import akka.actor.ActorRefProvider +import scala.util.control.NoStackTrace object LoggingBus { implicit def fromActorSystem(system: ActorSystem): LoggingBus = system.eventStream @@ -315,9 +316,7 @@ object Logging { def apply(logSource: String, message: Any) = new Error(NoCause, logSource, message) /** Null Object used for errors without cause Throwable */ - object NoCause extends RuntimeException { - setStackTrace(Array.empty[StackTraceElement]) - } + object NoCause extends NoStackTrace } case class Warning(logSource: String, message: Any = "") extends LogEvent {