Process-level handlers for uncaught exceptions, unhandled rejections, and warnings.
- Features
- Requirements
- Setup
- Usage
- Development
- Testing
- Troubleshooting
- Security
- API
- Packaging
- Examples
- Support
- Links
- License
The package adds listeners for uncaught exceptions, unhandled rejections, and warnings.
Use Node.js 26 or newer with ECMAScript module support.
Run npm install @eliware/errors to install the public npm package.
Import registerHandlers and select the events to receive:
import { registerHandlers } from "@eliware/errors";
const handlers = registerHandlers({ events: ["warning"] });
handlers.removeHandlers();Read the usage guide for options and behavior. Read the release notes for package changes.
Run npm ci to install development dependencies. Read the documentation index, examples index, and specifications index.
Run npm test from the repository root for tests and aggregate checks.
Read the troubleshooting guide for setup and cleanup errors.
The default logger receives selected error details. Check custom logger output for sensitive data.
The package exports registerHandlers and defaultEvents. Read the API reference for options, defaults, and behavior.
The runtime entry point is src/index.mjs, and its TypeScript declarations are in src/index.d.ts.
The files field in package.json defines package contents. Use numeric MAJOR.MINOR.PATCH versions and a v<version> Git tag for each release.
Validation does not publish the package. Follow Operations procedures for release authorization.
Read the examples index for prerequisites, commands, and expected results.
For help, questions, or to chat with the author and community, visit:


