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/actor-exceptions.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/actor-exceptions.scala')
-rw-r--r-- | test/files/jvm/actor-exceptions.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/jvm/actor-exceptions.scala b/test/files/jvm/actor-exceptions.scala index 77bf05c048..384226d777 100644 --- a/test/files/jvm/actor-exceptions.scala +++ b/test/files/jvm/actor-exceptions.scala @@ -13,12 +13,17 @@ case class MyOtherException(text: String) extends Exception { object Master extends Actor { trapExit = true def act() { + try { link(Slave) Slave.start() for (i <- 0 until 10) Slave ! A react { case Exit(from, reason) => } + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } } } @@ -28,6 +33,7 @@ object Slave extends Actor { case MyException(text) => } def act() { + try { var cnt = 0 loop { react { @@ -39,6 +45,10 @@ object Slave extends Actor { } } } + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } } } |