Novel Preposterous Mockery
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

syserrno

1.0.1 • Public • Published

node-errno

Build Status

An easier way to track errno's

This is mainly for use with node-launchctl

Install

$ npm install syserrno

API

#strerror(errno)

Params:

  • {Number} errno The error number

Example:

var errno = require('errno')
console.log(errno.strerror(148))
// outputs "Invalid domain"

#errorForCode(code)

Params:

  • {String} code The error code

Example:

var errno = require('errno')
var err = errno.errorForCode('EIVALDO')
console.log(err)

Returns: An Error object containing

{
  code: 'EIVALDO',
  msg: 'Invalid domain',
  errno: 148
}

#errorForErrno(errno)

Params:

  • {Number} errno The error number

Keywords

install

npm i syserrno

Downloadsweekly downloads

11

version

1.0.1

license

BSD

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar