Skip to content

Commit

Permalink
The only sensible solution is to log and rethrow, nooptimal solution.
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorklang committed Apr 24, 2012
1 parent 1f30be1 commit 11c130e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions akka-actor/src/main/scala/akka/dispatch/Dispatcher.scala
Expand Up @@ -4,7 +4,7 @@

package akka.dispatch

import akka.event.Logging.Warning
import akka.event.Logging.Error
import java.util.concurrent.atomic.AtomicReference
import akka.actor.ActorCell
import akka.util.Duration
Expand Down Expand Up @@ -59,7 +59,7 @@ class Dispatcher(
executorService.get() execute invocation
} catch {
case e2: RejectedExecutionException
prerequisites.eventStream.publish(Warning("Dispatcher", this.getClass, e2.toString))
prerequisites.eventStream.publish(Error(e, getClass.getName, getClass, "executeTask was rejected twice!"))
throw e2
}
}
Expand Down Expand Up @@ -87,7 +87,10 @@ class Dispatcher(
executorService.get() execute mbox
true
} catch { //Retry once
case e: RejectedExecutionException mbox.setAsIdle(); throw e
case e: RejectedExecutionException
mbox.setAsIdle()
prerequisites.eventStream.publish(Error(e, getClass.getName, getClass, "registerForExecution was rejected twice!"))
throw e
}
}
} else false
Expand Down

0 comments on commit 11c130e

Please sign in to comment.