_d_newThrowable

fnT _d_newThrowable(T)() if (is(T : Throwable) && __traits(getLinkage, T) == "D") @trusted

Allocate an exception of type T from the exception pool. T must be Throwable or derived from it and cannot be a COM or C++ class.

Note

This function does not call the constructor of T because that would require

forward!args, which causes errors with -dip1008. This inconvenience will be removed once -dip1008 works as intended.

Returns

allocated instance of type T