How do I make the JVM exit on ANY OutOfMemoryException even when bad people try to catch it

后端 未结 10 525
醉梦人生
醉梦人生 2020-12-09 16:32

An OOME is of the class of errors which generally you shouldn\'t recover from. But if it is buried in a thread, or someone catches it, it is possible for an application to g

10条回答
  •  攒了一身酷
    2020-12-09 16:49

    One more thing I could think of (although I do not know how to implement it) would be to run your app in some kind of debugger. I noticed, that my debugger can stop the execution when an exception is thrown. :-)

    So may be one could implement some kind of execution environment to achieve that.

提交回复
热议问题