Hi Team,
I need to get the details of an exception thrown from a child actor in the
supervisor.
In the untyped world I could have a decider function like below to get the
exception details
OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case *ex: ArithmeticException* => println(s"Child is in trouble
${ex.getMessage}") // Or any other task
Resume
}
However in the typed world I can only do something like -
Actor
.supervise(Child.behavior())
.*onFailure[RuntimeException]*(SupervisorStrategy.restartWithLimit(1,
FiniteDuration(1, "seconds")).withLoggingEnabled(true)),"child")
This doesn't give a way to get hold of the exception value in case there is
a need to do any other task apart from logging.
Is there a way I can get the exception value in the supervisor? If it's no
longer supported, is it to encourage any best practices that I am not aware
of ?
Thanks and Regards,
Nishant
--
>>>>>>>>>> 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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.