Small module that makes sure your catch, caught an actual error and not a programming mistake or assertion

Overview

safety-catch

Small module that makes sure your catch, caught an actual error and not a programming mistake or assertion.

npm install safety-catch

Triggers an unhandled error in the next tick, when you pass it an SyntaxError, TypeError, AssertionError and other builtins.

Usage

const safetyCatch = require('safety-catch')

try {
  foo.bar()
} catch (err) {
  // Was this a programming mistake and should you crash your program?
  // Ask the safety catch
  safetyCatch(err)

  console.log('Actual error')
}

License

MIT

You might also like...

Same as sqlite-tag but without the native sqlite3 module dependency

sqlite-tag-spawned Social Media Photo by Tomas Kirvėla on Unsplash The same sqlite-tag ease but without the native sqlite3 dependency, aiming to repla

Nov 20, 2022

The nestjs cache module based on cache-manager & decorators 🍃

A progressive Node.js framework for building efficient and scalable server-side applications. zirus-cache zirus-cache for Nest.JS - simple and modern

May 9, 2022

external eventbus module for @nestjs/cqrs

A Cqrs External EventBus module for Nest framework (node.js) Now available: Redis-EventBus Installation with npm npm install --save nest-external-even

Dec 23, 2022

Memcached module for Nest framework (node.js) 🐈

Memcached module and service for Nest, a progressive Node.js framework for building efficient and scalable server-side applications. Installation npm

Nov 24, 2022

Explore, create and deploy your SQLite databases right from your browser. Quick and easy, no installation required.

Explore, create and deploy your SQLite databases right from your browser. Quick and easy, no installation required.

SQLighter (under development, alpha code) SQLighter is a database explorer born for SQLite that helps you design and deploy your application database

Sep 20, 2022

StashQL is a light-weight, open-source npm package that improves the speed of your GraphQL queries in your application.

StashQL is a light-weight, open-source npm package that improves the speed of your GraphQL queries in your application.

Table of Contents What is StashQL? Install Getting Started Queries Mutations refillCache clearRelatedFields Logging The Team What is StashQL? StashQL

Sep 30, 2022

A Gmail Clone which built with ReactJS and Redux. You can sign in with your Google Account, compose a new e-mail and send realtime emails to the project.

Gmail Clone with ReactJS A Gmail Clone that you can sign in with your Google Account, compose a new e-mail and send realtime emails to the project. Cl

Nov 14, 2022

Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database!

Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database!

PostGraphile Instant lightning-fast GraphQL API backed primarily by your PostgreSQL database. Highly customisable and extensible thanks to incredibly

Jan 4, 2023

Create flexible REST endpoints and controllers from Sequelize models in your Express app

Finale Create flexible REST endpoints and controllers from Sequelize models in your Express or Restify app. This project aims to be a Sequelize 4.x an

Oct 18, 2022
Owner
Mathias Buus
Rød grød med fløde
Mathias Buus
This is very simple game catch word with JavaScript and Jquery

Catch-Word-js This is very simple game catch word with JavaScript and Jquery install and run guide! download project zip! extract zip file on any dire

Jortsoft 14 Nov 26, 2022
NodeDomainScrape - Use puppeteer to catch the data from domain.com.au

nodeDomainScrape 1 install node (https://nodejs.org/en/) and download the code; 2 run npm install in the terminal; 3 go to "https://www.domain.com.au/

null 1 Jan 2, 2022
A beautiful error page for PHP apps

DO NOT USE YET, THIS PACKAGE IS IN DEVELOPMENT Ignition: a beautiful error page for PHP apps Ignition is a beautiful and customizable error page for P

Spatie 237 Dec 30, 2022
A JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations.

What is dbcopycat A JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations. ⚡️ Abilities Creates the f

İsmail Can Karataş 13 Jan 8, 2023
A tiny wrapper around pg that makes PostgreSQL a lot of fun to use. Written in TypeScript.

A tiny wrapper around pg that makes PostgreSQL a lot of fun to use. Written in TypeScript.

Mojolicious 8 Nov 29, 2022
Welcome to the LEGO Games Repository, where you can enjoy anytime, anywhere. This is the 2021 KNU Advanced Web Programming team project.

Welcome to LEGO git repository! Here are some useful information about LEGO service. 0. Docker image Link : https://hub.docker.com/r/leibniz21c/legoga

Heesung Yang 16 Jul 21, 2022
📠 The backend of the Fairfield Programming Association website.

Backend Server Features Duck Generator We didn't want to use people's faces for the profile pictures. This was for three reasons: we didn't want to pa

Fairfield Programming Association 25 Nov 23, 2022
⚡️ lowdb is a small local JSON database powered by Lodash (supports Node, Electron and the browser)

Lowdb Small JSON database for Node, Electron and the browser. Powered by Lodash. ⚡ db.get('posts') .push({ id: 1, title: 'lowdb is awesome'}) .wri

null 18.9k Dec 30, 2022
A transparent, in-memory, streaming write-on-update JavaScript database for Small Web applications that persists to a JavaScript transaction log.

JavaScript Database (JSDB) A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to

Small Technology Foundation 237 Nov 13, 2022
membuat sebuah module pengganti database engine untuk mengelola data secara advance

Donate Sosial Media Introduction Database atau basis data adalah kumpulan data yang dikelola sedemikian rupa berdasarkan ketentuan tertentu yang salin

Jefri Herdi Triyanto 6 Dec 17, 2021