title: How to catch an exception within loop/react of an actor?
body: <p>Is it possible to catch an exception raised within <code>behaviour</code>? Where to place the <code>try/catch</code>? I know that <code>react</code> uses exceptions to reuse the same thread for different actors and that´s why I don´t know where to put the <code>try/catch</code>. I want to catch certain exceptions by myself for logging.</p>
  
  <pre><code>import scala.actors._
  def behaviour: PartialFunction[Any,Unit] = {
    case x =&gt; 
      println(x)
      throw new IllegalStateException
  }
  
  val a = new Actor {
    def act {
      loop {
        react {
          behaviour
        }
      }
    }
  }
  a.start
  a ! "Bam"
  </code></pre>