2 ms·
It's useful to have errors which are less typed than your "actual" results, because if you write a library then you don't want every possible error to be part o
by astrange 2y ago
It's useful to have errors which are less typed than your "actual" results, because if you write a library then you don't want every possible error to be part of your API. If you do, and you call some other library, then either you have to swallow its errors or commit to having all of its error APIs be part of yours too.
And in the end many errors can't be handled automatically, the best you can do is just show them to the user.