diff options
-rw-r--r-- | src/actors/scala/actors/Actor.scala | 8 | ||||
-rw-r--r-- | src/actors/scala/actors/Reaction.scala | 8 | ||||
-rw-r--r-- | src/actors/scala/actors/scheduler/SchedulerService.scala | 8 | ||||
-rw-r--r-- | src/library/scala/runtime/NonLocalReturnException.scala | 9 | ||||
-rw-r--r-- | src/library/scala/util/control/ControlException.scala | 2 | ||||
-rw-r--r-- | src/library/scala/util/control/NoStackTrace.scala | 20 |
6 files changed, 25 insertions, 30 deletions
diff --git a/src/actors/scala/actors/Actor.scala b/src/actors/scala/actors/Actor.scala index aa65f5a6ac..5972588089 100644 --- a/src/actors/scala/actors/Actor.scala +++ b/src/actors/scala/actors/Actor.scala @@ -882,10 +882,4 @@ case class Exit(from: AbstractActor, reason: AnyRef) * @version 0.9.8 * @author Philipp Haller */ -private[actors] class SuspendActorException extends Throwable with ControlException { - /* - * For efficiency reasons we do not fill in - * the execution stack trace. - */ - override def fillInStackTrace(): Throwable = this -} +private[actors] class SuspendActorException extends Throwable with ControlException diff --git a/src/actors/scala/actors/Reaction.scala b/src/actors/scala/actors/Reaction.scala index 2c8fa391ed..1c9541546a 100644 --- a/src/actors/scala/actors/Reaction.scala +++ b/src/actors/scala/actors/Reaction.scala @@ -14,13 +14,7 @@ package scala.actors import scala.util.control.ControlException import java.lang.{InterruptedException, Runnable} -private[actors] class KillActorException extends Throwable with ControlException { - /* - * For efficiency reasons we do not fill in - * the execution stack trace. - */ - override def fillInStackTrace(): Throwable = this -} +private[actors] class KillActorException extends Throwable with ControlException /** <p> * The abstract class <code>Reaction</code> associates diff --git a/src/actors/scala/actors/scheduler/SchedulerService.scala b/src/actors/scala/actors/scheduler/SchedulerService.scala index 2ae218bb24..ab86161dfb 100644 --- a/src/actors/scala/actors/scheduler/SchedulerService.scala +++ b/src/actors/scala/actors/scheduler/SchedulerService.scala @@ -97,10 +97,4 @@ abstract class SchedulerService(daemon: Boolean) extends Thread with ActorGC { * @version 0.9.8 * @author Philipp Haller */ -private[actors] class QuitException extends Throwable with ControlException { - /* - For efficiency reasons we do not fill in - the execution stack trace. - */ - override def fillInStackTrace(): Throwable = this -} +private[actors] class QuitException extends Throwable with ControlException diff --git a/src/library/scala/runtime/NonLocalReturnException.scala b/src/library/scala/runtime/NonLocalReturnException.scala index 2884a0ce9f..efca45b7bd 100644 --- a/src/library/scala/runtime/NonLocalReturnException.scala +++ b/src/library/scala/runtime/NonLocalReturnException.scala @@ -11,14 +11,7 @@ package scala.runtime - import Predef.RuntimeException import scala.util.control.ControlException -class NonLocalReturnException[T](val key: AnyRef, val value: T) extends RuntimeException with ControlException { - /* - * For efficiency reasons we do not fill in - * the execution stack trace. - */ - override def fillInStackTrace(): Throwable = this -} +class NonLocalReturnException[T](val key: AnyRef, val value: T) extends RuntimeException with ControlException
\ No newline at end of file diff --git a/src/library/scala/util/control/ControlException.scala b/src/library/scala/util/control/ControlException.scala index 4ac7b0ceeb..070d33dff4 100644 --- a/src/library/scala/util/control/ControlException.scala +++ b/src/library/scala/util/control/ControlException.scala @@ -36,4 +36,4 @@ package scala.util.control * * @author Miles Sabin */ -trait ControlException extends Throwable +trait ControlException extends Throwable with NoStackTrace diff --git a/src/library/scala/util/control/NoStackTrace.scala b/src/library/scala/util/control/NoStackTrace.scala new file mode 100644 index 0000000000..8658304f0f --- /dev/null +++ b/src/library/scala/util/control/NoStackTrace.scala @@ -0,0 +1,20 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +package scala.util.control + +/** A trait for exceptions which, for efficiency reasons, do not + * fill in the stack trace. + * + * @author Paul Phillips + * @since 2.8 + */ +trait NoStackTrace extends Throwable +{ + override def fillInStackTrace(): Throwable = this +} |