cli-fail

2019-08-14 admin

cli-fail是什么

什么是cli-fail,Fail with an error message and a correct exit code

cli-fail使用教程帮助文档

cli-fail Build Status

Fail with an error message and a correct exit code

Install

$ npm install --save cli-fail

Usage

var fail = require('cli-fail')

fail('it broke')
//=> prints "it broke" to console.error and exits with code 1

fail(new Error())
//=> prints err to console.error, then stack, then exits with code 1

API

fail(err)

err

Required Type: string / error

An error message or full error object to log.

License

MIT © Ben Drucker

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-72487.html

文章标题:cli-fail

回到顶部