0.1.5 • Published 9 years ago

web-errors v0.1.5

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

NPM version Build Status Dependency Status

Web errors provides an easy way to define and use errors for restful apis.

Benefits OR Aims

1.Unified Error Handling for servers and clients(browsers, android, ios)

2.Customizable error definitions

3.A standard general error standard for restful apis

Install

nodejs/iojs

$ npm install --save web-errors

bower

$ bower install --save web-errors

Usage

nodejs/iojs

var errors = require('web-errors').errors;

browser

<script src="bower_components/web-errors/dist/web-errors.js"></script>

How to define errors

example

Usage:

var webErrors = require('web-errors');

var conf = {
  data: {
    entities: '../lib/data/entities',
    properties: '../lib/data/properties',
    types: '../lib/data/types',
    events: '../lib/data/events',
    errors: '../lib/data/errors'
  },
  i18n: {
    "zh-CN": '../lib/data/i18n/zh-CN',
    "en-US": '../lib/data/i18n/en-US'
  }
};

webErrors.set(conf.data, config.i18n);

License

MIT © calidion

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.0

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago