:warning: Throw a given error.
npm:
npm install bail
var bail = require('bail')
bail()
bail(new Error('failure'))
// Error: failure
// at repl:1:6
// at REPLServer.defaultEval (repl.js:154:27)
// …
bail([err])
Throw a given error.
err
(Error?
) — Optional error.Error
— Given error, if any.