spirit-errors

1.0.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i spirit-errors

      Weekly Downloads

      0

      Version

      1.0.1

      License

      MIT

      Last publish

      Collaborators

      • alexray