static new AtomicLong _handleError_count; static new AtomicLong _handleError_outOfMemoryErrors; static volatile long _handleError_lastOutOfMemoryError; static _handleError(Error e) { print("\nHARD ERROR\n"); printStackTrace2(e); print("\nHARD ERROR\n"); incAtomicLong(_handleError_count); if (e instanceof OutOfMemoryError) { incAtomicLong(_handleError_outOfMemoryErrors); _handleError_lastOutOfMemoryError = sysNow(); } }