4 ms·
> in my opinion they all do the wrong thing What would be the right thing? Combining the original exception and the error from `close` into some kind of `Multi
by pansa2 2y ago
> in my opinion they all do the wrong thing
What would be the right thing? Combining the original exception and the error from `close` into some kind of `MultipleError`?
- saurik 2y agoPersonally I do not believe the math of these two monads allows for any better solutions (and I do not believe multierror is correct ;P)... I am thereby also very curious what they think the correct thing to do here is.
- cyco130 2y agoThat's probably the best option I think. I've heard Ada does that (but don't quote me on that). If you can access the original errors from the `MultipleError` object, at least you can tell the user what exactly went wrong. I don't thing there's one true right thing™ though. That's why explicit handling is necessary: The compiler doesn't have enough context to handle it for you. The programmer needs to decide what's the right way to handle it.