try without catch or finally

Jussi Kalliokoski jussi.kalliokoski at gmail.com
Tue Apr 17 13:52:54 PDT 2012


I don't think it's really necessary to have another keyword for that just
so you wouldn't forget the catch, sounds more like work for a static code
analysis tool to me, just like we don't want if (something) doSomething()
to throw just because you might have forgotten the curly braces.

P.S. Sorry Nebojša for double posting, I always forget reply all! ;)

On Tue, Apr 17, 2012 at 11:39 PM, Nebojša Ćirić <cira at google.com> wrote:

> It's easy to forget to catch in cases you wanted to.
>
> Maybe adding a new keyword:
>
> try {
> ...
> } drop;
>
> 17. април 2012. 13.35, Jussi Kalliokoski <jussi.kalliokoski at gmail.com> је
> написао/ла:
>
>> I'm not sure if this has been discussed before, but is it a terribly bad
>> idea to make catch/finally optional for a try block?
>>
>> There's a lot of code like this out there:
>>
>> try { /* something here */ } catch (e) { /* nothing here */ }
>>
>> Cheers,
>> Jussi
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
>
>
> --
> Nebojša Ćirić
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120417/b1be02b0/attachment.html>


More information about the es-discuss mailing list