This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/gauge/error.js

25 lines
616 B
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
'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
}