3 ms·
I think depends on the context. * If you are doing a library you can safely let the Error do the thing. * If you are building a web/API catch all the errors,
by Saphyel 4y ago
I think depends on the context.
* If you are doing a library you can safely let the Error do the thing.
* If you are building a web/API catch all the errors, log them and send a nice generic error to the client.
* If you are doing a CLI tool I prefer to do like the library but if it's for a final client probably I'd try to do it like with the web/API.