npm.io
1.0.1 • Published 12 years ago

spirit-errors

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0

Spirit Errors

Summary

the Spirit Errors middleware attaches and error event listener to log errors as part of the Spirit Core static file generator.

Syntax

var err = new Error( "Oops something went wrong." ) ;
spiritCore.emit( spiritCore.ERROR_EVENT, err ) ;
parameters

err
A valid javascript Error Object .

Examples

install Spirit Core

npm install spirit-core

var spirit = require( 'spirit-core' ) ;
var err = new Error( "Uh oh." ) ;
spirit.emit( spirit.ERROR_EVENT, err ) ;

Handmade in San Francisco California by Alex Ray

Keywords