I catch exceptions without handling, using this in my onCreate() activity:
mUEHandler = new Thread.UncaughtExceptionHandler() { @Override public void uncaughtException(Thread t, Throwable e) { try { PrintWriter pw = new PrintWriter(new OutputStreamWriter( openFileOutput(DMP_FILENAME, 0))); e.printStackTrace(pw); pw.flush(); pw.close(); } catch (FileNotFoundException e1) {
This writes every unhandled exception from your application that occurred in your activity to a text file. Then you can analyze it.
source share