Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gantman/over-armour
Rage Against the Crash
https://github.com/gantman/over-armour
Last synced: 15 days ago
JSON representation
Rage Against the Crash
- Host: GitHub
- URL: https://github.com/gantman/over-armour
- Owner: GantMan
- Created: 2017-12-01T00:57:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-01T02:37:08.000Z (almost 7 years ago)
- Last Synced: 2024-10-08T05:03:20.391Z (about 1 month ago)
- Language: JavaScript
- Size: 155 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Protect Functions and Classes from Crashes in Prod
[![npm version](https://badge.fury.io/js/over-armour.svg)](https://badge.fury.io/js/over-armour)
### Wrap an entire class in try/catch
Quickly protect an entire class from causing an exception with `fortify` method
_Example Protection:_
```js
const iCanError = new CrashyApi()
const protector = new OverArmour()// for PROD!
protector.fortify(iCanError)iCanError.failSauce('I will fail but not crash')
console.log('Still got here!')const workingWithAsync = async () => {
await iCanError.failSauceAsync('No try catches existed here!')
console.log('Got here, too!')
}
workingWithAsync()console.log('EOF!')
```