Replaced toString of message with exc.getMessage when logging exception from receive. Fixes 1152

This commit is contained in:
Patrik Nordwall 2011-08-29 15:37:31 +02:00
parent bbb9bc2c5e
commit c064aee89e
2 changed files with 3 additions and 3 deletions

View file

@ -90,7 +90,7 @@ class LoggingReceiveSpec
actor ! "bah"
within(300 millis) {
expectMsgPF() {
case EventHandler.Error(ex: UnhandledMessageException, ref, "bah") if ref eq actor true
case EventHandler.Error(ex: UnhandledMessageException, ref, exMsg) if ref eq actor true
}
}
actor.stop()

View file

@ -779,7 +779,7 @@ class LocalActorRef private[akka] (private[this] val props: Props, val address:
}
} catch {
case e
EventHandler.error(e, actorInstance.get(), messageHandle.message.toString)
EventHandler.error(e, actorInstance.get(), e.getMessage)
throw e
}
} else {
@ -959,7 +959,7 @@ class LocalActorRef private[akka] (private[this] val props: Props, val address:
}
private def handleExceptionInDispatch(reason: Throwable, message: Any) {
EventHandler.error(reason, this, message.toString)
EventHandler.error(reason, this, reason.getMessage)
//Prevent any further messages to be processed until the actor has been restarted
dispatcher.suspend(this)