Tag: Error Handling
7 posts
-
Go in 2 Weeks #05
Go error handling vs C++ try/catch: multiple returns, if err != nil, defer, fmt.Errorf %w, errors.Is/As, panic/recover. Practical examples for production.
-
C++ [[nodiscard]] Guide: Ignore Return Values Safely
Turn ignored return values into compiler warnings with [[nodiscard]]: error codes, RAII guards, factories, C++20 reason strings, and missing-warning cases.
-
TypeScript Error Handling: unknown in catch, Error Subclasses, cause, Result Types and Exhaustive Checks
How to handle errors in TypeScript: narrow unknown catch variables, write Error subclasses that survive instanceof, chain with cause, return Results and prove exhaustiveness.
-
Python Exception Handling: try/except/else/finally, Raising Errors and Custom Exceptions
Learn Python exceptions: try-except-else-finally, raising errors, custom exception classes, and safe patterns for files, I/O, and retries—with examples.
-
JavaScript Error Handling: try/catch/finally, Custom Errors, Rejected Promises and Retries
Handle JavaScript errors with try/catch/finally, built-in and custom Error classes, rejected promises and async/await, retry with backoff and Result wrappers.
-
Debugging Intermittent Unhandled Promise Rejections in Node.js: A Walkthrough
Why a Node.js API crashes with unhandled rejections only sometimes: early-created promises, return without await, Express 4 async routes, and fixes that hold.
-
Node.js & JavaScript Error Handling Best Practices
Node.js error handling for production: operational vs programmer errors, the three ways errors propagate, cause and captureStackTrace, fire-and-forget promises, EventEmitter error events, unhandled rejections, Express error middleware, and retries.