Skip to content

wooorm/bail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bail Build Status Coverage Status

⚠️ Throw a given error.

Installation

npm:

npm install bail

Usage

var bail = require('bail');

bail();

bail(new Error('failure'));
// Error: failure
//     at repl:1:6
//     at REPLServer.defaultEval (repl.js:154:27)
//     ...

API

bail([err])

Throw a given error.

Parameters
  • err (Error?) — Optional error.
Throws
  • Error — Given error, if any.

Related

License

MIT © Titus Wormer