Re: Allow `try…catch` blocks to return a value.

2015-07-13 Thread Bucaran
>> dropping some of them. >> >> /Andreas >> >> >> On 12 July 2015 at 10:26, Gary Guo wrote: >>> >>> This is not possible as it contracts with existing semantics. Wrap it with >>> a function instead. >>> >>>

Re: Allow `try…catch` blocks to return a value.

2015-07-13 Thread Michał Wadas
___ >> From: jbuca...@me.com >> Subject: Allow `try…catch` blocks to return a value. >> Date: Sun, 12 Jul 2015 06:53:52 +0900 >> To: es-discuss@mozilla.org >> >> >> Allow `try…catch` blocks to return a value. >> >> Sometimes I wrap a `try…ca

Re: Allow `try…catch` blocks to return a value.

2015-07-13 Thread Andreas Rossberg
ing semantics. Wrap it with > a function instead. > > -- > From: jbuca...@me.com > Subject: Allow `try…catch` blocks to return a value. > Date: Sun, 12 Jul 2015 06:53:52 +0900 > To: es-discuss@mozilla.org > > > Allow `try…catch` blocks to retur

RE: Allow `try…catch` blocks to return a value.

2015-07-12 Thread Gary Guo
This is not possible as it contracts with existing semantics. Wrap it with a function instead. From: jbuca...@me.com Subject: Allow `try…catch` blocks to return a value. Date: Sun, 12 Jul 2015 06:53:52 +0900 To: es-discuss@mozilla.org Allow `try…catch` blocks to return a value.Sometimes I wrap

Allow `try…catch` blocks to return a value.

2015-07-11 Thread Bucaran
Allow `try…catch` blocks to return a value. Sometimes I wrap a `try…catch` in a function and return a value based in whether there was an error or not. It would be useful if you could use `return` inside a `try…catch` block to accomplish the same. ```js let stuff = try { return