Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

springbokjs-errors

2.1.0 • Public • Published

springbokjs-errors NPM version Drone.io Status

Parse an error with its stack trace, apply source maps and render it in console or in html

Use

For console

var stackParser = require('springbokjs-stack-trace');

try {
    //...
} catch (err) {
    console.error(stackParser.parse(err).toString());
}

Html rendering

var HtmlStackRenderer = require('springbokjs-stack-trace/lib/HtmlRenderer');
var htmlStackRenderer = new HtmlStackRenderer();

function(req, res) {
    try {
        //...
    } catch (err) {
        res.send(500, htmlStackRenderer.render(err));
    }
}

See the auto-generated docs

Keywords

install

npm i springbokjs-errors

Downloadsweekly downloads

4

version

2.1.0

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability