finki-main
main
|
Last change
on this file since 62b2964 was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
616 bytes
|
| Line | |
|---|
| 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.