koa-face-errors
Add some fun to your errors.
Last updated 6 years ago by samhogg .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install koa-face-errors 
SYNC missed versions from official npm registry.

koa-face-errors

Errors with ASCII faces. Just because.

Based on cool-ascii-faces

Installation

npm install --save koa-face-errors

Usage

Require in your middleware stack somewhere near the top, it'll catch your Error and slip some fun in the mix.

Example

var app = require('koa'),
    faceHandler = require('koa-face-errors'),
    port = process.env.PORT || 3000

app.use(faceHandler())

app.use(function *(){
  this.throw(500, 'whoops')
})

app.listen(port)
console.log('Listening on port', port)

Current Tags

  • 1.0.2                                ...           latest (6 years ago)

3 Versions

  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |