diff options
author | Philipp Haller <hallerp@gmail.com> | 2010-04-13 14:41:02 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2010-04-13 14:41:02 +0000 |
commit | bc791369f79f2d1a72a93674eb7b0f34ca58d8d1 (patch) | |
tree | a29f5941272cbe318f67f446d8202156da0ecf06 /test/files/jvm/replyablereactor3.scala | |
parent | c54b7a99e8a4913ceee3f40631edba72c33145ec (diff) | |
download | scala-bc791369f79f2d1a72a93674eb7b0f34ca58d8d1.tar.gz scala-bc791369f79f2d1a72a93674eb7b0f34ca58d8d1.tar.bz2 scala-bc791369f79f2d1a72a93674eb7b0f34ca58d8d1.zip |
Hardened actor tests. No review.
Diffstat (limited to 'test/files/jvm/replyablereactor3.scala')
-rw-r--r-- | test/files/jvm/replyablereactor3.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/jvm/replyablereactor3.scala b/test/files/jvm/replyablereactor3.scala index b33db811e2..2c26b8a176 100644 --- a/test/files/jvm/replyablereactor3.scala +++ b/test/files/jvm/replyablereactor3.scala @@ -3,6 +3,7 @@ import scala.actors.Actor._ class MyActor extends ReplyReactor { def act() { + try { loop { react { case 'hello => @@ -11,6 +12,10 @@ class MyActor extends ReplyReactor { exit() } } + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } } } @@ -21,6 +26,7 @@ object Test { val b = new Reactor[Any] { def act() { + try { react { case r: MyActor => var i = 0 @@ -35,6 +41,10 @@ object Test { } } } + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } } } b.start() |