Thursday, September 6, 2012

Re: [android-developers] Re: fatal_error

this is nice for debugging, not really the user.

It kind of depends, but most of the exceptions you *expect*, internet
timeouts, etc.., you can write logic to handle that.

kris

On Thu, Sep 6, 2012 at 4:38 PM, RichardC <richard.critten@googlemail.com> wrote:
> 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

--
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