On Tuesday, 18 March 2025 at 07:42:37 UTC, Jonathan M Davis wrote:
The base class constructors are not nothrow, so WrappedTCP's constructor cannot be nothrow. There really isn't a way out of that, because if a constructor throws, the object's state is destroyed. So, catching and handling the Exception to make your function nothrow isn't really an option like it would be with many functions.

FWIW, this does compile:

```d
class A
{
    this() {}
}

class B : A
{
    this() nothrow {
        try {
            super();
        } catch(Exception e) {}
    }
}
```
Not sure if it should...

-Steve

Reply via email to