Return null on error
333760
String subCommand(String cmd, ArgTokenizer at, String[] subs) {
        at.allowedOptions("-retain");
        String sub = at.next();
        if (sub == null) {
            // No sub-command was given
            return at.hasOption("-retain")
                    ? "_retain"
                    : "_blank";
        }
        String[] matches = Arrays.stream(subs)
                .filter(s -> s.startsWith(sub))
                .toArray(String[]::new);
        if (matches.length == 0) {
            // There are no matching sub-commands
            errormsg("jshell.err.arg", cmd, sub);
            fluffmsg("jshell.msg.use.one.of", Arrays.stream(subs)
                    .collect(Collectors.joining(", "))
            );
            return null;
        }
        if (matches.length > 1) {
            // More than one sub-command matches the initial characters provided
            errormsg("jshell.err.sub.ambiguous", cmd, sub);
            fluffmsg("jshell.msg.use.one.of", Arrays.stream(matches)
                    .collect(Collectors.joining(", "))
            );
            return null;
        }
        return matches[0];
    }
1255803
def get_error(self, i=None, unit=None,
                  uncover=None, trail=None,
                  linebreak=None, sort_by_indep=None):
        
        return self.get_value(i=i, unit=unit,
                              uncover=uncover, trail=trail,
                              linebreak=linebreak, sort_by_indep=sort_by_indep,
                              attr='_error')
930483
function onRequestError(error, result, endCallback) {
      result.currentRetries++;
      async.parallel([
        async.apply(recrawlError, error, result),
        async.apply(retrySameUrl,error, result)
      ],function(error){
          endCallback(error);
      });

  }
440282
function(err, result) {
      if (err && !util.isError(err)) {
        err = new Error(err);
      }
      if (callback) callback(err, result);
    }
607480
def error_handler(f):
    """"""
    @wraps(f)
    def inner(*args, **kwargs):
        try:
            return f(*args, **kwargs)
        except ReceiverDoesNotExist:
            return jsonify(
                status=404,
                description='Receiver does not exists.'
            ), 404
        except InvalidPayload as e:
            return jsonify(
                status=415,
                description='Receiver does not support the'
                            ' content-type "%s".' % e.args[0]
            ), 415
        except WebhooksError:
            return jsonify(
                status=500,
                description='Internal server error'
            ), 500
    return inner
654580
function errors($fieldname) {
		if ($fieldname == null) {
			return null;
		}
		else { # field errors
			if ($this->errors !== null) {
				if (isset($this->errors[$fieldname])) {
					return $this->errors[$fieldname];
				}
				else { # not set
					return null;
				}
			}
		}
	}
859202
function _onError(error) {
        if (_connectDeferred) {
            _connectDeferred.reject();
            _connectDeferred = null;
        }
        exports.trigger("error", error);
    }
746340
public static void checkNotNull(Object value, String message, Object... args) {
    if (value == null) {
      throw new NullPointerException(String.format(message, args));
    }
  }
908654
function (err) {
    "use strict";

    var message = '';

    if (typeof err === 'string') {
      return new Error(err);

    } else if (typeof err === 'object') {

      if (err.cause) {
        // probably a webdriver error
        try {
          message = JSON.parse(err.cause.value.message).errorMessage;
        } catch ($) {
          message = err.cause.value.message;
        }
      } else {
        message = err.message || err.toString();
      }
      return new Error(message);
    }
    return new Error(err.toString());
  }
580245
function NullInPathError() {
    var instance = new Error("`null` and `undefined` are not allowed in branch key positions");

    instance.name = "NullInPathError";

    if (Object.setPrototypeOf) {
        Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
    }

    if (Error.captureStackTrace) {
        Error.captureStackTrace(instance, NullInPathError);
    }

    return instance;
}
232397
function get (manager, errorInfoCb, id) {
  const value = manager.store.get(id)
  if (_.isUndefined(value)) {
    const errorInfo = errorInfoCb(id)
    const e = new Error(errorInfo.message)
    e.name = errorInfo.name
    throw e
  }

  return value
}
438050
function getError(errno, app) {
	let errObj = {
		errno: errno,
		message: errors[errno].replace('$app', app)
	};
	return errObj.message;
}
697803
@Override
    public void onError(final Throwable t) {

        Objects.requireNonNull(t);
        if (stream != null)
            ((Consumer) stream.getErrorHandler()
                    .orElse((Consumer) h -> {
                    })).accept(t);
        if (errorHandler != null)
            errorHandler.accept(t);

    }
595949
private Throwable getPropogatedError() {
		Request req = getRequest();

		if (req != null) {
			return (Throwable) req.getAttribute(ACTION_ERROR_KEY);
		}

		return null;
	}
151618
def echo_error(root_resource, message):
  """"""
  params = dict(message=message)
  return root_resource.get(ECHO_ERROR_PATH, params)
500528
@Override
    public void onError(final Throwable t) {

        Objects.requireNonNull(t);

        if (errorHandler != null)
            errorHandler.accept(t);

    }
714463
function on_error(xhr, status, error) {
	var response = new anchor._response_handler(null);
	response.okay(false);
	response.message(error);
	response.message_type(status);
	anchor.apply_callbacks('error', [response, anchor]);
    }