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.
25 lines
616 B
25 lines
616 B
4 weeks ago
|
'use strict'
|
||
|
var util = require('util')
|
||
|
|
||
|
var User = exports.User = function User (msg) {
|
||
|
var err = new Error(msg)
|
||
|
Error.captureStackTrace(err, User)
|
||
|
err.code = 'EGAUGE'
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
exports.MissingTemplateValue = function MissingTemplateValue (item, values) {
|
||
|
var err = new User(util.format('Missing template value "%s"', item.type))
|
||
|
Error.captureStackTrace(err, MissingTemplateValue)
|
||
|
err.template = item
|
||
|
err.values = values
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
exports.Internal = function Internal (msg) {
|
||
|
var err = new Error(msg)
|
||
|
Error.captureStackTrace(err, Internal)
|
||
|
err.code = 'EGAUGEINTERNAL'
|
||
|
return err
|
||
|
}
|