On 10/4/14 2:45 PM, Shammah Chancellor wrote:

int main()
{
     scope(exit) return 0;
     assert(false, "whoops!");
}

The above smells to me like it should be invalid. Specifically, the scope(exit) line by itself.

If you want to catch and not propagate an error, you need to use try/catch directly.

scope(exit|success|failure) is for cleaning up resources, not returning from the function.

-Steve

Reply via email to