nothrow by default
Walter Bright
newshound2 at digitalmars.com
Thu Jan 9 06:28:25 UTC 2020
On 1/5/2020 4:27 AM, Gregor Mückl wrote:
> It would be nice to have choice here.
>
>> 2) (Optional): Herb arguest that because of throw ... it is easy to spot
>> where an exception originates, but it's more difficult to find where
>> an exception was propagated. As a solution,
>> whenever calling a throws function, the calls should be preceeded by
>> throw:
>> auto value = throw myThrowingFunction();
>> Here throw does essentially this: If myThrowingFunction threw, rethrow
>> the exception. Otherwise return the return value.
>>
>
> I hope that this doesn't require code to have a throw keyword in every other
> line.
For D, the `throw` attribute will apply to the function, not the statement.
More information about the Digitalmars-d
mailing list