On 08/08/2012 12:44 PM, Martin Krejcirik wrote:

> Easy, just catch Throwable :-)

The problem is, Error (and Throwable) should not be caught. There is no guarantee of program behavior when an Error is thrown. At the least, an AssertError is by definition pointing at bad program state so no further action should make sense.

On the other hand, in my case catching by Throwable was the only way I could figure out why my concurrency program was getting stuck. So yeah, I guess the guideline should be don't catch Error in general. :)

Ali

Reply via email to