Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1362

Handle the Exception when it is thrown in a Typed Actor

$
0
0

Hi All,

I like to catch and store the exception thrown in a typed actor.

I see 2 options here:

Behaviors.supervise(handler).onFailure(MySupervisorStrategy) -> having your own supervisor strategy that allows to decide what todo with failures (like storing)

Or Behaviors .receiveSignal(…)
using the Partial function to catch the exception and store it.

Somehow, the ChildFailed(ref, sig)) doesn’t get into my receiveSignal (I throw an IllegalArgumentException in a commandHandler, just for testing) and a custom SupervisorStrategy seems not an option for Typed Actors.

Any advice on how to move this forward ?

Kind regards,

Olger

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1362

Trending Articles