On 5/29/22 13:53, Christian Köstlin wrote:

> According to
> https://www.schveiguy.com/blog/2022/05/comparing-exceptions-and-errors-in-d/
> its bad to catch Errors ...

Correct in the sense that the program should not continue after catching Error.

> so dowork should catch only Exception?

It should catch Error as well. Otherwise you will have no idea why a thread disappeared. You may agree with me here:

  https://youtu.be/dRORNQIB2wA?t=1950

I catch'ed Throwable in the code just because it's a quick little experiment.

> it might be better
> to crash directly ...

Sounds good but only after leaving the reason behind somehow.

Ali

Reply via email to