1.0.2 • Published 7 years ago

error-handler-nt v1.0.2

Weekly downloads
2
License
ISC
Repository
gitlab
Last release
7 years ago

ErrorHandler

Module that provides functions for error handling.

Installation

$ npm install error-handler-nt --save

Documentation

  • create(status = 500, message = "", origin = "")

    	Returns CError object
  • cast(err, origin = "")

    	Cast error to CError<br>
  • send(res, err)

    	Send the error as a response (only for Express framework)
  • createAndSend(res, status = 500, message = "", origin = "")

    	Create and send an error in the same function (only for Express framework)
  • log(err)

    	Log the error