@function logHttpRequestError

@param {object} uniqueId
@param {object} err
188546
function logHttpRequestError (uniqueId, err) {
    // require log client
    if (!logClient) {
        return
    }
    // log error
    logClient.log('httpRequestError', {
        httpRequestId: uniqueId.id,
        httpRequestErrorCreateTime: microTimestamp(),
        httpRequestError: err.message,
    })
}
987156
function(errMsg, err) {
      this.newline();
      doLog('*******************************************************************');
      doLog('* ERROR                                                           *');
      doLog('*******************************************************************');

      if (generalUtils.isEmpty(err)) {
        doLog(errMsg);
      } else {
        doLogError(errMsg, err);
      }
      this.newline();
    }
169145
function onError(err) {
    const ctx = this.$ctx;
    const cn = npm.utils.getSafeConnection(ctx.cn);
    npm.events.error(ctx.options, err, {cn, dc: ctx.dc});
    ctx.disconnect(err);
    if (ctx.cnOptions && typeof ctx.cnOptions.onLost === 'function' && !ctx.notified) {
        try {
            ctx.cnOptions.onLost.call(this, err, {
                cn,
                dc: ctx.dc,
                start: ctx.start,
                client: this
            });
        } catch (e) {
            npm.con.error(e && e.stack || e);
        }
        ctx.notified = true;
    }
}
140575
function KboxRequireError(id, err) {
  Error.call(this);
  this.message = [id, err.message].join(' -> ');
  this.stack = [this.message, err.stack].join('\n');
}
117490
function(err) {

        var message = 'Error occured while performing a JSON-WSP request. ' +
            err.message + '\n' +
            JSON.stringify({
                options : curOpts
            }, null, '  ').yellow;

        logger.error(message);
    }
1235368
function logError(message, err, context, event) {
  var current_err = err;
  while (current_err) {
    var next_err = current_err._previous;
    delete current_err._previous;
    if (current_err.stack) {
      console.error(current_err.stack);
    } else {
      console.error(current_err);
    }
    current_err = next_err;
  }
  // TODO add cli options for logging out context and event as well
}
1114436
function (err) {
                var responseOptions = new ResponseOptions({
                    body: err,
                    type: ResponseType.Error,
                    status: _xhr.status,
                    statusText: _xhr.statusText,
                });
                if (baseResponseOptions != null) {
                    responseOptions = baseResponseOptions.merge(responseOptions);
                }
                responseObserver.error(new Response(responseOptions));
            }
291161
function HttpRequestError(nestedError, status, body){

  nestedError = nestedError || null;
  status = status || -1;
  body = body || null;

  superError.call(
    this,
    'HttpRequestError',
    util.format('An error [%s] occurred requesting content from an HTTP source: %s', status, nestedError || body)
  );

  this.status = status;
  this.body = body;
  this.nestedError = nestedError;
}
1242000
function(err) {
          console.log('SOCKET ' + command +
                      '(' + debugStr(request.data, 30) + ') Exception');
          util.errorHandler(err);

          socket.emit('reply', {
            id: request.id,
            exception: '' + err
          });
        }
630391
function errorHandler(err, req, res, next){
  if (!req.suppressErrorHandlerConsole && !req.app.suppressErrorHandlerConsole) {
    if (req.log) {
      req.log.error(err, "Unhandled Error");
    } else {
      console.log("Unhandled error");
      console.log(err.stack || err);
    }
  }
  if (err.status) res.statusCode = err.status;
  if (res.statusCode < 400) res.statusCode = 500;
  if (res._header) return; //??
  var accept = req.headers.accept || '';
  var stack = req.app.get('env') != 'production' ? err.stack : '';
  // html
  if (~accept.indexOf('html')) {
    res.render('error.html', {
      message: http.STATUS_CODES[res.statusCode],
      statusCode: res.statusCode,
      error: err.toString(),
      errorstack: (stack || '').split('\n').slice(1)
    });
  // json
  } else if (~accept.indexOf('json')) {
    var error = { message: err.message, stack: stack };
    for (var prop in err) error[prop] = err[prop];
    res.json({ error: error });
  // plain text
  } else {
    res.setHeader('Content-Type', 'text/plain');
    res.end(stack);
  }
}
884208
function errorPage(res, err) {
		if (err) {
			console.error(err.message);
			res.send(err, {'Content-Type': 'text/plain'}, 500);
		} else {
			res.send(404);
		}
	}
1070785
function dbError(tx, err) {
            if (calledDBError) {
                return;
            }
            err = idbModules.util.findError(arguments);
            req.readyState = "done";
            req.error = err || "DOMError";
            var e = idbModules.util.createEvent("error");
            e.debug = arguments;
            idbModules.util.callback("onerror", req, e);
            calledDBError = true;
        }
294818
function handleRequestError(eventTarget, type) {
  readyStateChange(eventTarget, states.DONE);

  dispatchProgressEvent(eventTarget, {
    type: 'progress',
    total: 0,
    loaded: 0,
    lengthComputable: false
  });

  dispatchProgressEvent(eventTarget, {
    type: type,
    total: 0,
    loaded: 0,
    lengthComputable: false
  });

  dispatchProgressEvent(eventTarget, {
    type: 'loadend',
    total: 0,
    loaded: 0,
    lengthComputable: false
  });
}
1078426
function onerror(err) {
    if (!err) {
      return;
    }
    debug('[%s] [cfork:master:%s] master uncaughtException: %s', Date(), process.pid, err.stack);
    debug(err);
    debug('(total %d disconnect, %d unexpected exit)', disconnectCount, unexpectedCount);
  }
670391
function logError (failure, index) {
  index = index + 1

  if (index > 1) {
    log('\n\n')
  }

  log('  ' + index + ') ' + failure.description + ': ')

  if (failure.environment) {
    log(('(' + failure.environment + ')').grey)
  }

  log('\n\n')

  // Log the actual error message / stack trace / diffs
  var intend = 4 + String(index).length
  var error = formatError(failure.error, intend)

  if (!_empty(error.message)) {
    log(error.message + '\n')
  }

  if (!_empty(error.stack)) {
    log('\n' + error.stack.grey + '\n')
  }
}
1278390
function writeError(code, res, msg) {
	try{
		if (res.headerSent) {
			logger.error("header Sent:", res.req.method, res.req.originalUrl);
		}
		if (httpCodeMapping) {
			code = mapHttpStatusCode(code);
		}
		msg = msg instanceof Error ? msg.message : msg;
		addStrictTransportHeaders(res);
		setResponseNoCache(res);
		if (typeof msg === 'string') {
			var err = JSON.stringify({Severity: "Error", Message: msg});
			res.setHeader('Content-Type', 'application/json');
			res.setHeader('Content-Length', err.length);
			res.writeHead(code);
			res.end(err);
		} else {
			res.writeHead(code);
			res.end();
		}
	}catch(err){
		logger.error(res.req.originalUrl , err.message);
		throw err;
	}
}
539403
function log(err) {
    if (_logger) {
      if (typeof(err) == 'string') {
        err = { message: err, code: 0 }
      }
      _logger(err);
    }
  }