4 ms·
> A better (but still not perfect) pattern is to wrap the errors So manually reinvent exceptions :-)
by azth 5y ago
> A better (but still not perfect) pattern is to wrap the errors
So manually reinvent exceptions :-)
- marcus_holmes 5y agoWrapping errors is not the same as exceptions. At all. Even vaguely.
- azth 5y agoYou don't get stack traces with wrapping errors, which means exceptions are still strictly superior.
- marcus_holmes 5y agoAgain, you're confusing two different things. You can still wrap error messages and have a stack trace.
- azth 5y agoWhich have to be done manually or through code gen. So we're back at exceptions, but with the downsides of verbosity, and ability to forget to propagate them. Basically inferior exceptions in practically every way.