Added the ErrorHandler notifications to all try-catch blocks

This commit is contained in:
Jonas Bonér 2011-03-02 00:14:45 +01:00
parent ce00125aba
commit 6f6d459dcd
17 changed files with 162 additions and 56 deletions

View file

@ -4,7 +4,7 @@
package akka.dispatch
import akka.actor.{ActorRef, IllegalActorStateException}
import akka.actor.{ActorRef, IllegalActorStateException, ErrorHandler, ErrorHandlerEvent}
import akka.util.{ReflectiveAccess, Switch}
import java.util.Queue
@ -132,6 +132,7 @@ class ExecutorBasedEventDrivenDispatcher(
executorService.get() execute mbox
} catch {
case e: RejectedExecutionException =>
ErrorHandler notifyListeners ErrorHandlerEvent(e, this, _name)
mbox.dispatcherLock.unlock()
throw e
}