I know, that it harms application performance, but should not we surround places of code, which really risky with e.g.
try {
// code
} catch (OutOfMemoryError ex) {
// handling code
}
It looks pretty safe.
From docs:
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
Why not?