Best practices for catching Throwable in Java

后端 未结 4 1495
孤城傲影
孤城傲影 2021-02-05 17:41

Sometimes, you just have to catch Throwable, e.g. when writing a dispatcher queue that dispatches generic items and needs to recover from any errors (said dispatcher logs all ca

4条回答
  •  孤独总比滥情好
    2021-02-05 18:01

    What about OutOfMemoryError (or perhaps its super class VirtualMachineError)? I can't imagine there is much you can do after something that serious.

提交回复
热议问题