"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/gauge/error.js" (8 Mar 2017, 616 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 }