Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
run-time-error-cjs
Advanced tools
A better error that is inspired by the Java exception that is also serializable to JSON.
A better error that is inspired by the Java exception that is also serializable to JSON.
import { RuntimeError } from 'run-time-error';
try
{
throw new Error('The root cause error.');
}
catch (cause)
{
throw new RuntimeError('An unexpected error occurred while performing an operation.', cause);
}
This module can also be treated as a CommonJS module:
const { RuntimeError } = require('run-time-error');
This project is available through the Node Package Manager (NPM), so you can install it like so:
npm install run-time-error
Please Note: Versions of Node lower than v12.0.0 are not supported.
You can build UMD and ESM versions of this module that are minified:
npm run build
This module also has a robust test suite:
npm test
This also runs code quality checks using ESLint. Please refer to the .eslintrc
files to familiar yourself with the rules.
This project is released under the MIT license.
1.4.0 - 2021-05-16
import { RuntimeError } from 'run-time-error';
// instead of
import RuntimeError from 'run-time-error';
FAQs
A better error that is inspired by the Java exception that is also serializable to JSON.
The npm package run-time-error-cjs receives a total of 367 weekly downloads. As such, run-time-error-cjs popularity was classified as not popular.
We found that run-time-error-cjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.