All languages

JavaScript

You're viewing a free preview. Sign in free to read every script.

Why this exists A tool that dies with a wall of stack trace is hard to operate, and one that swallows an error is worse: it carries on with bad data. Reliable Node programs handle errors at the right level, keep the…

JavaScript Basics: Error Handling, Custom Errors, Error Causes and Unhandled Rejections

Handle failure properly in Node: try, catch and finally in sync and async code, custom error classes with a cause, deciding by error code, why an Error is not JSON, several failures at once, the timer error that try/catch cannot catch, and a process-level last line of defence with the right exit code.

Sign in free to read this script, along with the rest of the library.

Sign in free