9 ms·
It does work that way, but I was thinking of the case where FooError was one of the three types you wanted to throw. You can also declare errors as structs, so
by MBCook 1y ago
It does work that way, but I was thinking of the case where FooError was one of the three types you wanted to throw.
You can also declare errors as structs, so that’s where you could use inheritance.