Ah yes, uncaught. Thanks for the correction. 

> On 13 Nov 2017, at 21:12, Viktor Klang <[email protected]> wrote:
> 
> When you say "unhandled exception" you mean "uncaught exception"?
> 
>> On Mon, Nov 13, 2017 at 4:48 AM, Christopher Hunt <[email protected]> wrote:
>> Hi everyone,
>> 
>> I have a situation where I need to call System.exit upon an actor system 
>> having terminated. In some runtime situations, a SecurityException will be 
>> thrown and I need that to be propagated as an unhandled exception. I can go 
>> into the details of why if required, but my question is how to enable this. 
>> Here's my existing termination handler which does what I want. However, I'm 
>> wondering if there's a better way given that onComplete and friends all 
>> swallow exceptions and pass them onto the Dispatcher's reporter:
>> 
>>   system.whenTerminated
>>     .andThen {
>>       case _ =>
>>         new Thread({ () =>
>>           println("Exiting")
>>           System.exit(exitStatus.getOrElse(1))
>>         }: Runnable).start()
>>     }
>> 
>> 
>> Cheers,
>> -C
>> -- 
>> >>>>>>>>>> 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.
> 
> 
> 
> -- 
> Cheers,
> √
> -- 
> >>>>>>>>>> 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 a topic in the Google 
> Groups "Akka User List" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/akka-user/gZkCvLWhyGc/unsubscribe.
> To unsubscribe from this group and all its topics, 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.

-- 
>>>>>>>>>>      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.

Reply via email to