scope(failure): get exception

Jonathan M Davis jmdavisProg at gmx.com
Sun Oct 28 05:20:16 PDT 2012


On Sunday, October 28, 2012 13:08:50 Jacob Carlborg wrote:
> What about allowing catch-statements without a try-statement, something
> like this:
> 
> void foo ()
> {
>      // some code ...
> 
>      catch (Exception e)
>      {
> 
>      }
> }
> 
> This would be the same as the whole function would be wrapped in a
> try-statement. It's a quite handy feature that's available in Ruby.

So, you save one set of braces? I don't see how that really buys you much.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list