handleFatalError
@private
180503
public function handleFatalError()
    {
        $this->reservedMemory = null;

        $lastError = error_get_last();

        if ($lastError && \in_array($lastError['type'], self::$fatalErrors, true)) {
            $this->logger->log(
                $this->fatalLevel ?? LogLevel::ALERT,
                'Fatal Error (' . self::codeToString($lastError['type']) . '): ' . $lastError['message'],
                [
                    'code' => $lastError['type'],
                    'message' => $lastError['message'],
                    'file' => $lastError['file'],
                    'line' => $lastError['line']
                ]
            );

            if (method_exists($this->logger, 'flush')) {
                $this->logger->flush();
            }

            if ($this->logger instanceof Logger) {
                foreach ($this->logger->getHandlers() as $handler) {
                    if ($handler instanceof AbstractHandler) {
                        $handler->close();
                    }
                }
            }
        }
    }
989912
def error_handler(f):
    """"""
    @wraps(f)
    def inner(*args, **kwargs):
        try:
            return f(*args, **kwargs)
        except NoResultFound:
            abort(404)
        except IntegrityError:
            abort(500)
    return inner
1293774
function ajaxError(error, type, xhr, settings) {
    var context = settings.context
    settings.error.call(context, xhr, type, error)
    triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error])
    ajaxComplete(type, xhr, settings)
  }
488019
function onError( error ) {
		self.req.error = error;
		if ( process.connected ) {
			// TODO: log (or not; serialize in output message?)
			console.error( process.pid, 'request', error );
		}
	}
105510
function handleErr_(errback, json) {
  if (errback && json && json.error) {
    errback(json.error);
  }
}
72460
function(err, model, response, options){
  if (options.cb){
    options.cb(err, model, response);
  }
  if (err){
    model.trigger('error', err, model, options);
  }
}
1370448
function handleSuccess() {
  clearOutdatedErrors();

  var isHotUpdate = !isFirstCompilation;
  isFirstCompilation = false;
  hasCompileErrors = false;

  // Attempt to apply hot updates or reload.
  if (isHotUpdate) {
    tryApplyUpdates(function onHotUpdateSuccess() {
      // Only dismiss it when we're sure it's a hot update.
      // Otherwise it would flicker right before the reload.
      tryDismissErrorOverlay();
    });
  }
}
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);
  }
}
413711
function onError(error) {
    if (error.syscall !== 'listen') throw error;

    const bind = (typeof port === 'string')
                ? 'Pipe ' + port
                : 'Port ' + port;

    // handle specific listen errors with friendly messages
    switch (error.code) {
      case 'EACCES':
        console.error(bind + ' requires elevated privileges');
        process.exit(1);
        break;

      case 'EADDRINUSE':
        console.error(bind + ' is already in use');
        process.exit(1);
        break;

      default:
        throw error;
    }
  }
580100
function handleError(err) {
  if (typeof err === 'string' && errors[err]) {
    console.error(errors[err]);
  } else {
    if (argv.verbose) {
      console.error(err.stack);
    } else {
      console.error(err.message);
    }
  }
  process.exit(1);
}
24803
function handleError(call, error) {
  var statusMetadata = new Metadata();
  var status = {
    code: constants.status.UNKNOWN,
    details: 'Unknown Error'
  };
  if (error.hasOwnProperty('message')) {
    status.details = error.message;
  }
  if (error.hasOwnProperty('code') && Number.isInteger(error.code)) {
    status.code = error.code;
    if (error.hasOwnProperty('details')) {
      status.details = error.details;
    }
  }
  if (error.hasOwnProperty('metadata')) {
    statusMetadata = error.metadata;
  }
  status.metadata = statusMetadata._getCoreRepresentation();
  var error_batch = {};
  if (!call.metadataSent) {
    error_batch[grpc.opType.SEND_INITIAL_METADATA] =
        (new Metadata())._getCoreRepresentation();
  }
  error_batch[grpc.opType.SEND_STATUS_FROM_SERVER] = status;
  call.startBatch(error_batch, function(){});
}
1112430
function (error) {
    // update status
    me.resolved = false;
    me.rejected = true;
    me.pending = false;

    _onFail.forEach(function (fn) {
      fn(error);
    });

    _process = function (onSuccess, onFail) {
      onFail(error);
    };

    _resolve = _reject = function () { }

    return me;
  }
1334640
protected void onFatalError(Throwable t) {
		try {
			log.error("Fatal error occurred in ResourceManager.", t);
		} catch (Throwable ignored) {}

		// The fatal error handler implementation should make sure that this call is non-blocking
		fatalErrorHandler.onFatalError(t);
	}
994058
function onResError (ctx, err) {
  // nothing we can do here other
  // than delegate to the app-level
  // handler and log.
  if (ctx.headerSent || ctx._finished != null) {
    err.headerSent = ctx.headerSent
    err.context = ctx.toJSON()
    return err
  }

  // unset headers
  if (isFn(ctx.res.getHeaderNames)) {
    for (let name of ctx.res.getHeaderNames()) {
      if (!ON_ERROR_HEADER_REG.test(name)) ctx.res.removeHeader(name)
    }
  } else { // Node < 7.7
    let _headers = ctx.res._headers
    if (_headers) {
      // retain headers on error
      for (let name of Object.keys(_headers)) {
        if (!ON_ERROR_HEADER_REG.test(name)) delete _headers[name]
      }
    }
  }
  // support ENOENT to 404, default to 500
  if (err.code === 'ENOENT') ctx.status = 404
  else if (typeof err.status !== 'number' || !statuses[err.status]) ctx.status = 500
  else ctx.status = err.status

  ctx.set('x-content-type-options', 'nosniff')
  // support JSON error object: { error: 'BadRequest', message: 'Some bad request' }
  ctx.body = !isError(err) ? err : {
    error: err.error || err.name,
    message: err.expose ? err.message : statuses[ctx.status]
  }
  respond.call(ctx)
  return err
}
602892
function error() {

                        this.httpRequest.upload.onerror = function onError() {

                            $scope.$apply(function apply() {

                                $scope.finishedUploading();
                                $scope.isError = true;

                                var response = $scope.options.parserFn(this.httpRequest.responseText);
                                $rootScope.$broadcast('$dropletError', response);
                                $scope.onError({ response: response });
                                this.deferred.reject(response);

                            }.bind(this));

                        }.bind(this);

                    }
333363
function handleFailedEvent(event) {
        var data = getData(event);
        viewerAPI.fire('realtimeerror', { error: data });
        realtime.destroy();
    }
849096
function handleErrorCallback(cb) {
  return function(err) {
    if (err) {
      logger.error(err);
      return cb(err);
    }
    return cb.apply(this, arguments);
  };
}