Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
616 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | 'use strict'
|
---|
| 2 | var util = require('util')
|
---|
| 3 |
|
---|
| 4 | var 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 |
|
---|
| 11 | exports.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 |
|
---|
| 19 | exports.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.