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...
}

Reply via email to