how to catch Error globally on android?
<p>When an exception occurs, i try to report it to a log server.</p>

<p>i have caught an exception which inherited java.lang.RuntimeException when using <code>Thread.setDefaultUncaughtExceptionHandler(Thread.UncaughtExceptionHandler handler)</code>.
but i haven't caught any subclasses that have inherited java.lang.Error. (ex. OutOfMemoryError, IOError, ...)</p>

<p>so i use <code>Runtime.addShutdownHook(Thread hookThread)</code>, but the <code>hookThread.run()</code> method is never called.</p>

<p>how do i catch an Error globally on android?
i do not want to use another process.. i just want to try to report a bug on the log server.</p>

<p>sorry evertyone, i try to catch error throwable continuedly, and i know java.lang.Error also is  caught. but not run implemented function in UncaughtExceptionHandler.uncaughtException().</p>

<p>just.. printed log for checking.</p>
