source: trip-planner-front/node_modules/gauge/error.js@ 8d391a1

Last change on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 616 bytes
Line 
1'use strict'
2var util = require('util')
3
4var User = exports.User = function User (msg) {
5 var err = new Error(msg)
6 Error.captureStackTrace(err, User)
7 err.code = 'EGAUGE'
8 return err
9}
10
11exports.MissingTemplateValue = function MissingTemplateValue (item, values) {
12 var err = new User(util.format('Missing template value "%s"', item.type))
13 Error.captureStackTrace(err, MissingTemplateValue)
14 err.template = item
15 err.values = values
16 return err
17}
18
19exports.Internal = function Internal (msg) {
20 var err = new Error(msg)
21 Error.captureStackTrace(err, Internal)
22 err.code = 'EGAUGEINTERNAL'
23 return err
24}
Note: See TracBrowser for help on using the repository browser.