diff options
Diffstat (limited to 'test/files/jvm/reactor-exceptionOnSend.scala')
-rw-r--r-- | test/files/jvm/reactor-exceptionOnSend.scala | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/test/files/jvm/reactor-exceptionOnSend.scala b/test/files/jvm/reactor-exceptionOnSend.scala deleted file mode 100644 index 3684943b9b..0000000000 --- a/test/files/jvm/reactor-exceptionOnSend.scala +++ /dev/null @@ -1,44 +0,0 @@ -import scala.actors.Reactor -import scala.actors.Actor._ - -case class MyException(text: String) extends Exception(text) - -object A extends Reactor { - override def exceptionHandler = { - case MyException(text) => - println("receiver handles exception") - } - - def guard(): Boolean = - if (state == 0) { - state = 1 - throw MyException("illegal state") - } else - true - - var state = 0 - - def act() { - loop { - react { - case 'hello if guard() => - println("process") - exit() - } - } - } -} - -object B extends Reactor { - def act() { - A.start() - A ! 'hello - A ! 'hello - } -} - -object Test { - def main(args: Array[String]) { - B.start() - } -} |