On 8 November 2016 at 09:37, Walter Bright via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
> On 11/6/2016 8:30 PM, Manu via Digitalmars-d wrote: > >> Hey people, I'm passing lots of D function pointers to C, and naturally, >> the C >> api expects the fp signatures are all nothrow. >> >> Which means, my D functions all look like this: >> >> void callback() nothrow >> { >> try >> { >> ...lots of code... >> } >> catch (Exception e) >> { >> ...log error or abort... >> } >> } >> >> >> I'm generally annoyed by all the extra indentation. >> > > void callback() nothrow > { > scope (failure) > { > ...log error or abort... > } > ...lots of code... > } > scope(failure) doesn't catch... how is that function nothrow?