diff options
Diffstat (limited to 'test/files/jvm/actor-uncaught-exception2.scala')
-rw-r--r-- | test/files/jvm/actor-uncaught-exception2.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/jvm/actor-uncaught-exception2.scala b/test/files/jvm/actor-uncaught-exception2.scala index 973cfb370a..626ce5da92 100644 --- a/test/files/jvm/actor-uncaught-exception2.scala +++ b/test/files/jvm/actor-uncaught-exception2.scala @@ -8,20 +8,32 @@ object Test { case object StartError extends Actor { def act() { + try { throw new MyException("I don't want to run!") + } catch { + case e: Throwable if (!e.isInstanceOf[scala.util.control.ControlThrowable] && + !e.isInstanceOf[MyException]) => + e.printStackTrace() + } } } case object MessageError extends Actor { def act() { + try { react { case _ => throw new MyException("No message for me!") } + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } } } case object Supervisor extends Actor { def act() { + try { trapExit = true link(StartError) link(MessageError) @@ -38,6 +50,10 @@ object Test { exit() } } + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } } } |