Skip to content
eliwarePublic

Repository files navigation

eliware.org

@eliware/errors npm License CI

Process-level handlers for uncaught exceptions, unhandled rejections, and warnings.

Table of Contents

Features

The package adds listeners for uncaught exceptions, unhandled rejections, and warnings.

Requirements

Use Node.js 26 or newer with ECMAScript module support.

Setup

Run npm install @eliware/errors to install the public npm package.

Usage

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.

Development

Run npm ci to install development dependencies. Read the documentation index, examples index, and specifications index.

Testing

Run npm test from the repository root for tests and aggregate checks.

Troubleshooting

Read the troubleshooting guide for setup and cleanup errors.

Security

The default logger receives selected error details. Check custom logger output for sensitive data.

API

The package exports registerHandlers and defaultEvents. Read the API reference for options, defaults, and behavior.

Packaging

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.

Examples

Read the examples index for prerequisites, commands, and expected results.

Support

For help, questions, or to chat with the author and community, visit:

Discordeliware.org

eliware.org on Discord

Links

License

MIT © Eliware