JavaScript Errors Guide
Error objects represent runtime errors in JavaScript. They provide debugging information including the error type, message, and stack trace. The guide walks through Error Types, Throwing & Catching, Custom Errors. `Error` is the base type. Built-in subclasses include: `SyntaxError` (invalid syntax), `TypeError` (wrong type), `ReferenceError` (undefined variable), `RangeError` (value out of range), `URIError` (URI handling error). `throw new Error("message")` throws an error. `try...catch...finally` handles errors. The `catch` block receives the error object with `message` and `stack` properties. `finally` runs regardless of error. The guide is organized into 3 sections that build on each other, each pairing a prose explanation with runnable code. Browse the individual methods covered by this guide in the Errors category. Key APIs covered include Error(), Error.prototype.message, Error.prototype.name, Error.prototype.stack, TypeError(), RangeError(). Related guides: Arrays, Strings, Numbers, Math, Date. This is one of 145 JavaScript guides on JS Reference — see the full list on the guides page.