New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

no-exception

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

no-exception

Library that implements a crash early, crash hard approach to handling unexpected failure conditions

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
3
-70%
Maintainers
1
Weekly downloads
 
Created
Source

no-exception

Library that implements a crash early, crash hard approach to handling unexpected failure conditions.

Usage

Inspired by Austral's approach to error handling, no-exception automatically registers event handlers for known events indicating unexpected failure conditions. The goal of these handlers is to surface the offending errors and to force a restart / reload of the entire application to ensure a consistent internal state; this is achieved by either crashing the process (for server-side runtimes) or rendering the error into an overlay that visually takes over the page (for browsers).

import 'no-exception';

The format object is a dictionary of serializers that allows developers to customize the message that is presented when crashing the application.

import { format } from 'no-exception';

format.head = (err: any): string => 'main error summary';
format.text = (err: any): string => 'detailed error message';

License

MIT

Keywords

exception

FAQs

Package last updated on 18 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts