Throwable.toString - multiple declarations - D Programming Language (original) (raw)

Function Throwable.toString

Overrides [Object.toString](../object/object.to%5Fstring.html) and returns the error message. Internally this forwards to the toString overload that takes a sink delegate.

`override string toString();

`

Function Throwable.toString

The Throwable hierarchy uses a toString overload that takes asink delegate to avoid GC allocations, which cannot be performed in certain error situations. Override this [](../object/throwable.to%5Fstring.html)[toString](../object/throwable.to%5Fstring.html) method to customize the error message.

`void toString(
scope void delegate(in char[]) sink
) const;

`

Authors

Walter Bright, Sean Kelly

License

Boost License 1.0.