Thursday, September 6, 2012

[android-developers] Re: fatal_error

The nice thing about throwing an exception is you will get the stack back trace in the log

On Thursday, September 6, 2012 9:20:10 PM UTC+1, bob wrote:
I decided to do this for the time being:

public class Error_Handler {
public static void fatal_error(String err)
{
Log.e("fatal error", err);
System.exit(1);
}

}



On Thursday, September 6, 2012 10:29:45 AM UTC-5, bob wrote:

Back in the day, when I used to program Windows and other systems, I had a function like this:


void fatal_error(char *msg)

{

cout << msg << endl;

exit(1);

}



Is there an easy way to make something similarly elegant and useful in Android?


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment