<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 8 November 2016 at 09:37, Walter Bright via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 11/6/2016 8:30 PM, Manu via Digitalmars-d wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey people, I'm passing lots of D function pointers to C, and naturally, the C<br>
api expects the fp signatures are all nothrow.<br>
<br>
Which means, my D functions all look like this:<br>
<br>
void callback() nothrow<br>
{<br>
try<br>
{<br>
...lots of code...<br>
}<br>
catch (Exception e)<br>
{<br>
...log error or abort...<br>
}<br>
}<br>
<br>
<br>
I'm generally annoyed by all the extra indentation.<br>
</blockquote>
<br></span>
void callback() nothrow<br>
{<br>
    scope (failure)<br>
    {<br>
        ...log error or abort...<br>
    }<br>
    ...lots of code...<br>
}<br></blockquote><div><br></div></div></div><div class="gmail_extra">scope(failure) doesn't catch... how is that function nothrow?</div></div>