Error Error Object
Last updated: 2026-09-09
Error Error Object
Error is the base class with name/message/stack. Built-in subtypes included.
| Category | Error Types |
|---|---|
| ES version | ES1 |
📝 Syntax
throw new Error('message');
▶ Example
Edit the code, press Run, and see the result in the output panel:
Output:
TypeError
type error
💡 Tip Use specific subclasses instead of generic Error.
ℹ️ info Custom errors extend Error.
🏷️ Related Items
💡 Related Cases
More case studies coming soon — check back later.
📚 Related Tutorials
❓ FAQ
QBuilt-in error types?
AError/TypeError/RangeError/SyntaxError etc.
QWhat is stack?
AThe call stack string.
QHow to create custom errors?
Aclass AppError extends Error.