Function: defsFailed
Report an error in loading the defs file, but continue on using WGS84
972282
public function defsFailed()
    {
        Proj4php::reportError('failed to load projection definition for: ' . $this->srsCode);

        // Set it to something so it can at least continue
        $this->proj4php->addDef(
            $this->srsCode,
            $this->proj4php->WGS84
        );

        $this->defsLoaded();
    }
64785
function showResults(files, formattedFiles, unformattedFiles, errors) {
    const formattedCount = formattedFiles.length;
    const unformattedCount = unformattedFiles.length;
    const errorCount = errors.length;
    const filesCount = files.length;
    const okCount = filesCount - formattedCount - unformattedCount - errorCount;

    if (okCount > 0 && !simplifyOutput) {
        console.log(okCount + ' of ' + filesCount + ' files already correct.');
    }

    if (formattedCount > 0) {
        if (!simplifyOutput) {
            console.log('Formatted ' + formattedCount + ' of ' + filesCount + ' files:');
        }
        for (const sourcePath of formattedFiles) {
            if (simplifyOutput) {
                console.log(sourcePath);
            } else {
                console.log('    - ' + sourcePath);
            }
        }
    }

    if (unformattedCount > 0) {
        // Should only happen when !fixMode
        console.error(unformattedCount + ' of ' + filesCount + ' files need formatting:');
        for (const sourcePath of unformattedFiles) {
            console.error('    - ' + sourcePath);
        }
        process.exitCode = 1;
    }

    if (errorCount > 0) {
        console.error('\x1b[32mErrors occured processing ' + errorCount + ' of ' + filesCount + ' files.\x1b[m');
        process.exitCode = -1;
    }

    return { formattedFiles, unformattedFiles };
}
1162829
function parseError (err) {
    var filePath, lineNum, splitLines
    var result = {}

    // For root files that syntax-error doesn't pick up:
    var parseFilePrefix = 'Parsing file '
    if (err.indexOf(parseFilePrefix) === 0) {
      var pathWithErr = err.substring(parseFilePrefix.length)
      filePath = getFilePath(pathWithErr)
      if (!filePath) return result
      result.path = filePath
      var messageAndLine = pathWithErr.substring(filePath.length)
      lineNum = /\((\d+):(\d+)\)/.exec(messageAndLine)
      if (!lineNum) return result
      result.message = messageAndLine.substring(1, lineNum.index).trim()
      result.line = parseInt(lineNum[1], 10)
      result.column = parseInt(lineNum[2], 10)
      result.format = true
      return result
    }

    // if module not found
    var cannotFindModule = /^Cannot find module '(.+)' from '(.+)'(?:$| while parsing file: (.*)$)/.exec(err.trim())
    if (cannotFindModule) {
      result.missingModule = cannotFindModule[1]
      result.path = cannotFindModule[3] || cannotFindModule[2]
      result.message = "Cannot find module '" + result.missingModule + "'"
      result.format = true
      return result
    }

    // syntax-error returns the path and line number, also a \n at start
    err = err.trim()
    filePath = getFilePath(err)
    if (!filePath) return result
    result.path = filePath

    var restOfMessage = err.substring(filePath.length)
    var parsedSyntaxError = /^:(\d+)/.exec(restOfMessage)
    if (parsedSyntaxError) { // this is a syntax-error
      lineNum = parseInt(parsedSyntaxError[1], 10)
      if (isFinite(lineNum)) result.line = lineNum
      splitLines = restOfMessage.split('\n')
      var code = splitLines.slice(1, splitLines.length - 1).join('\n')
      result.code = code
      result.message = splitLines[splitLines.length - 1]
      result.format = true
      return result
    }

    // remove colon
    restOfMessage = restOfMessage.substring(1).trim()
    var whileParsing = 'while parsing file: '
    var whileParsingIdx = restOfMessage.indexOf(whileParsing)
    if (whileParsingIdx >= 0) {
      var beforeWhile = restOfMessage.substring(0, whileParsingIdx)
      lineNum = /\((\d+):(\d+)\)/.exec(beforeWhile.split('\n')[0])
      var messageStr = beforeWhile
      if (lineNum) {
        var line = parseInt(lineNum[1], 10)
        var col = parseInt(lineNum[2], 10)
        if (isFinite(line)) result.line = line
        if (isFinite(col)) result.column = col
        messageStr = messageStr.substring(0, lineNum.index)
      }
      result.message = messageStr.trim()
      splitLines = restOfMessage.split('\n')
      result.code = splitLines.slice(2).join('\n')
      result.format = true
    }

    return result
  }
606525
function fsOperationFailed(stream, sourceFile, err) {
	if (err.code !== 'ENOENT') {
		stream.emit('error', new PluginError('gulp-changed', err, {
			fileName: sourceFile.path
		}));
	}

	stream.push(sourceFile);
}
516726
def _raise_glfw_errors_as_exceptions(error_code, description):
    
    global ERROR_REPORTING
    if ERROR_REPORTING:
        message = "(%d) %s" % (error_code, description)
        raise GLFWError(message)
667115
function compileDefinition(def) {
  if (_.isArray(def)) {
    return _.map(def, compileDefinition);
  }

  try {
    if (def[0] == '{') {
      // Plain object defined behaviour => wrap in braces.
      return eval(`(${def})`);
    }
    else if (def[0] == '[') {
      // Definition array => first deserialize array, then definitions inside.
      let behArr = eval(`(${def})`);

      return _.map(behArr, item => compileDefinition(item));
    }

    return eval(def);
  }
  catch (err) {
    parentPort.postMessage({ error: 'Compilation error: ' + err });

    process.exit(1);
  }
}
1274528
function loaded() {
            if (shimConf) {
                var exports;
                if (typeof shimConf.init === 'function') {
                    exports = shimConf.init.apply(
                        global,
                        modGetModulesExports(shimDeps, BUILDIN_MODULE)
                    );
                }

                if (exports == null && shimConf.exports) {
                    exports = global;
                    each(
                        shimConf.exports.split('.'),
                        function (prop) {
                            exports = exports[prop];
                            return !!exports;
                        }
                    );
                }

                globalDefine(moduleId, shimDeps, function () { 
                    return exports || {};
                });
            }
            else {
                modCompletePreDefine(moduleId);
            }

            modAutoDefine();
        }
935708
function unhandledErrorListener(err, namespace) {
  console.error('[distribucache] (%s) error from an unhandled ' +
    '`error` event:\n', namespace, err && err.stack || err);
}
710044
def processDefines(defs):
    
    if SCons.Util.is_List(defs):
        l = []
        for d in defs:
            if d is None:
                continue
            elif SCons.Util.is_List(d) or isinstance(d, tuple):
                if len(d) >= 2:
                    l.append(str(d[0]) + '=' + str(d[1]))
                else:
                    l.append(str(d[0]))
            elif SCons.Util.is_Dict(d):
                for macro,value in d.items():
                    if value is not None:
                        l.append(str(macro) + '=' + str(value))
                    else:
                        l.append(str(macro))
            elif SCons.Util.is_String(d):
                l.append(str(d))
            else:
                raise SCons.Errors.UserError("DEFINE %s is not a list, dict, string or None."%repr(d))
    elif SCons.Util.is_Dict(defs):
        # The items in a dictionary are stored in random order, but
        # if the order of the command-line options changes from
        # invocation to invocation, then the signature of the command
        # line will change and we'll get random unnecessary rebuilds.
        # Consequently, we have to sort the keys to ensure a
        # consistent order...
        l = []
        for k,v in sorted(defs.items()):
            if v is None:
                l.append(str(k))
            else:
                l.append(str(k) + '=' + str(v))
    else:
        l = [str(defs)]
    return l
976267
function maybeJsdomError(error)
{
        if (jsdomErr)
        {
                error.message += '\nJsdom might fail to load because of this error: ' +
                                 jsdomErr.message +
                                 '\n' +
                                 jsdomErr.stack;
        }

        error.jsdomCause = jsdomErr;

        return error;
}
820055
function _onFinishedLoadingDOM() {
        var request = new XMLHttpRequest();
        request.open("GET", exports.url);
        request.onload = function onLoad() {
            if ((request.status >= 200 && request.status < 300) ||
                    request.status === 304 || request.status === 0) {
                _mapDocumentToSource(request.response);
                _load.resolve();
            } else {
                var msg = "Received status " + request.status + " from XMLHttpRequest while attempting to load source file at " + exports.url;
                _load.reject(msg, { message: msg });
            }
        };
        request.onerror = function onError() {
            var msg = "Could not load source file at " + exports.url;
            _load.reject(msg, { message: msg });
        };
        request.send(null);
    }
1068651
function handleJumptoDef(response) {

        var file = response.file,
            offset = response.offset;

        var $deferredJump = getPendingRequest(file, offset, MessageIds.TERN_JUMPTODEF_MSG);

        if ($deferredJump) {
            response.fullPath = getResolvedPath(response.resultFile);
            $deferredJump.resolveWith(null, [response]);
        }
    }
1221849
function _safeLoadDependency(name) {
    try {
        window[name.split('/').pop()] = require(`../src/charts/${name}`);
    } catch(e) {
        errors.push({
            error: e,
            filePath: name
        });
    }
}
80362
def _runDeferredFunctions(deferredFunctions):
        
        failures = []
        for deferredFunction in deferredFunctions:
            try:
                deferredFunction.invoke()
            except:
                failures.append(deferredFunction.name)
                logger.exception('%s failed.', deferredFunction)
        return failures
700873
function getErrorSource(error) {
  var match = /\n    at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack);
  if (match) {
    var source = match[1];
    var line = +match[2];
    var column = +match[3];

    // Support the inline sourceContents inside the source map
    var contents = fileContentsCache[source];

    // Support files on disk
    if (!contents && fs && fs.existsSync(source)) {
      try {
        contents = fs.readFileSync(source, 'utf8');
      } catch (er) {
        contents = '';
      }
    }

    // Format the line from the original source code like node does
    if (contents) {
      var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
      if (code) {
        return source + ':' + line + '\n' + code + '\n' +
          new Array(column).join(' ') + '^';
      }
    }
  }
  return null;
}
1296149
function errorify (res) {
  var cwd = process.cwd()
  var count = res.errorCount + res.warningCount
  var err = new Error('' + count + (count === 1 ? ' issue' : ' issues') + ' found:')
  err.stack = '' + err.message

  res.results.forEach(function (result) {
    result.messages.forEach(function (message) {
      err.stack += ('\n    ' +
        result.filePath.replace(cwd, '').replace(/^\//, '') +
        ':' + message.line + ':' + message.column + ': ' +
        message.message + ' (' + message.ruleId + ')')
    })
  })

  return err
}
1145686
function ConfigError(lineno, line, file, err) {
  this.name = ConfigError.name;
  Error.call(this);

  var fmt = '*** FATAL CONFIG FILE ERROR ***%s';
  fmt += 'Reading the configuration file, at line %s%s';
  fmt += '>>> %s%s';
  fmt += err && err.message && !(err instanceof TypeDefError) ? err.message :
    'Bad directive or wrong number of arguments';

  this.message = util.format(fmt, EOL, lineno, EOL, line, EOL);
  this.file = file;
  this.err = err;
}