Hello,
I am trying to understand why in an FSM the onTermination handler is not
called with StopEvent(FSM.Failure,_,_) upon a failure in an event handler.
And in general what are the semantics of FSM.Failure?
I run a test like this:
class AMachine extends FSM[String, String] {
startWith("S", "D")
when("S") {
case Event("E", _) =>
throw new Exception("Arrgh")
}
onTermination {
case StopEvent(FSM.Failure(cause), state, data) => println("Oops") // NEVER
COMES HERE
}
initialize()
}
ActorSystem().actorOf(Props[AMachine]) ! "E"
I expected the "Oops" statement to execute in this case, however it doesn't (in
Akka 2.3.12)
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.