1.2.1 • Published 6 years ago
resin-cli-errors v1.2.1
resin-cli-errors
Resin.io CLI error interpreter.
This package is now deprecated
Resin-cli-errors is now built into Resin CLI itself, so this package is not maintained, and should not be used.
Role
The intention of this module is to provide an error interpreter to translate common error codes to user friendly and more helpful messages.
Installation
Install resin-cli-errors
by running:
$ npm install --save resin-cli-errors
Documentation
errors.interpret(error) ⇒ String
Kind: static method of errors
Summary: Interpet an error instance
Returns: String - error message
Access: public
Param | Type | Description |
---|---|---|
error | Error | error |
Example
error = new Error()
error.code = 'ENOGIT'
message = errors.interpret(error)
console.log(message)
> Git is not installed on this system.
> Head over to http://git-scm.com to install it and run this command again.
Support
If you're having any problem, please raise an issue on GitHub and the Resin.io team will be happy to help.
Tests
Run the test suite by doing:
$ gulp test
Contribute
- Issue Tracker: github.com/resin-io-modules/resin-cli-errors/issues
- Source Code: github.com/resin-io-modules/resin-cli-errors
Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:
$ gulp lint
License
The project is licensed under the Apache 2.0 license.