You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

error.js 616B

123456789101112131415161718192021222324
  1. 'use strict'
  2. var util = require('util')
  3. var User = exports.User = function User (msg) {
  4. var err = new Error(msg)
  5. Error.captureStackTrace(err, User)
  6. err.code = 'EGAUGE'
  7. return err
  8. }
  9. exports.MissingTemplateValue = function MissingTemplateValue (item, values) {
  10. var err = new User(util.format('Missing template value "%s"', item.type))
  11. Error.captureStackTrace(err, MissingTemplateValue)
  12. err.template = item
  13. err.values = values
  14. return err
  15. }
  16. exports.Internal = function Internal (msg) {
  17. var err = new Error(msg)
  18. Error.captureStackTrace(err, Internal)
  19. err.code = 'EGAUGEINTERNAL'
  20. return err
  21. }