[android-developers] Re: UncaughtExceptionHandler

2012-09-11 Thread Kevin Gaudin
Hi, This is a great answer ;-) For your information, the code which terminates the application was taken from the original android default UncaughtExceptionHandler source code. Kevin http://acra.ch On Monday, September 10, 2012 9:43:16 PM UTC+2, Lew wrote: > > bob wrote: >> >> Not sure if this

[android-developers] Re: UncaughtExceptionHandler

2012-09-10 Thread Lew
bob wrote: > > Not sure if this is good since he calls System.exit, which I was told > never to call. > >> >>> "I was told ..." To avoid cargo-cult programming, one should delve into the rationale behind advice. The rationale to avoid 'System.exit()', which is different advice from never use i

[android-developers] Re: UncaughtExceptionHandler

2012-09-10 Thread bob
Looks like he is doing this: public void uncaughtException(Thread t, Throwable e) { Log.e(ACRA.LOG_TAG, "ACRA caught a " + e.getClass().getSimpleName() + " exception for " + mContext.getPackageName() + ". Building report."); // Generate

[android-developers] Re: UncaughtExceptionHandler

2012-09-10 Thread RichardC
Have a look at source for ACRA http://code.google.com/p/acra/ On Monday, September 10, 2012 7:08:24 PM UTC+1, bob wrote: > > > Can someone help me see what a *good* Android UncaughtExceptionHandler > looks like? > > I wrote this, but I suspect it is bad: > > public class BSOD_Exception_Handler i

[android-developers] Re: UncaughtExceptionHandler not called ?

2010-04-16 Thread mac-systems
Just to make this Complete, there some J2SE Code which shows whats expected: public final class ThreadLogger implements Thread.UncaughtExceptionHandler { private final static String LOG_TAG = ThreadLogger.class.getSimpleName(); /* * (non-Javadoc) * * @se