I have a problem with my phone not printing uncaught exceptions in logcat.
To show the problem i have this piece of code:
ArrayList list = null;
list.add("something");
The only thing logcat shows is:
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x4160ac80)
The weird thing is that i have another phone which prints the correct null pointer exception. Furthermore, printing messages with Log.e(TAG,"error") works perfectly. Anyone know why this might happen?
This worked if anyone has the same problem:
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
ex.printStackTrace();
}
});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments