Re-thinking developer experience • Product @Gitpod 🍊 Helping folks get their start in cloud • @openupthecloud ☁️ AWS Community Builder 🛠 Replies in GIFS 😃
Wrap any nested code into a try/catch where you think necessary, and throw an explicit error for things which you're handling
Anything that comes through as an unhandled exception then becomes a ticket, and the error handling is put in place to ensure the unhandled exception is put in place.
Doing this means you never miss any unhandled errors, and gives a very clear pattern for error handling in JS.
But... I prefer go's way of doing things, which becomes essentially the same, but without the high level try/catch boilerplate, etc.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A nice article! Thanks for writing up!
My approach to error handling in JS I detailed here:
thedevcoach.co.uk/error-handling-j...
But the TL;DR: is:
Doing this means you never miss any unhandled errors, and gives a very clear pattern for error handling in JS.
But... I prefer go's way of doing things, which becomes essentially the same, but without the high level try/catch boilerplate, etc.