On Fri, Nov 25, 2011 at 1:22 AM, Lew <[email protected]> wrote:

>
>
> On Thursday, November 24, 2011 8:49:39 PM UTC-8, Kristopher Micinski wrote:
>>
>>
>> >> >> I'm just here to confirm what the other two coders told you ~ I
>> found
>> >> >> it on first read place a catch( Throwable ) around the call
>> >> >> to .print_result(MyService.
>> >> >
>> >> > That's actually pretty bad advice.  Don't place a 'catch (Throwable
>> >> > ...)'
>> >> > around anything.
>> >> >
>> >>
>> >> Ever?
>> >
>> > That is a good question.
>> > I suggest asking it each time the situation comes up.
>>
>> There are 'correct' uses of try / catch blocks, and exceptions in the
>> Java language.  You might be able to get away with avoiding using them in
>> your own code, but the standard library throws things, so you can't
>> completely avoid ignoring them.
>>
>> If you want to enforce a coding standard which eschews them, that's fine,
>> but I don't think it makes sense (otherwise) to make a blanket statement
>> against their use.
>>
>>
> OK, and who was making a blanket statement against the use of exceptions?
>
>
Sorry, Lew, I wasn't clear on this one, and I agree that your statement
doesn't come off as "blanket against exceptions" as I implied.  However,
there are uses of catch throwables that aren't completely harmful, as you
can rethrow after handling.  Although yes, you shouldn't use them for
swallowing up exceptions..

kris

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

Reply via email to