error classes 
Base Error
771008
function DriverError (message, constructor) {
  if (constructor) {
    Error.captureStackTrace(this, constructor);
    this.name = constructor.name;
  }
  this.message = message || 'Error';
  this.info = 'Cassandra Driver Error';
}
1065245
function erroz(error) {

    var errorFn = function (data) {

        //apply all attributes on the instance
        for (var errKey in errorFn.prototype) {
            if (errorFn.prototype.hasOwnProperty(errKey)) {
                this[errKey] = errorFn.prototype[errKey];
            }
        }

        //overwrite message if invoked with string
        if (typeof data === "string") {
            this.message = data;
            data = {};
        }

        this.data = data || {};

        this.message = this.message || erroz.options.renderMessage(error.template || "", this.data);

        errorFn.super_.call(this, this.constructor);
    };

    util.inherits(errorFn, AbstractError);

    //add static error properties (name, status, etc)
    for (var errKey in error) {
        if (error.hasOwnProperty(errKey)) {
            errorFn.prototype[errKey] = error[errKey];
        }
    }

    /**
     * return an object containing only JSend attributes
     * @returns {{status: *, code: *, message: *, data: (*|string|Object[]|Object|String)}}
     */
    errorFn.prototype.toJSend = function () {
        var data = this.data;

        if (erroz.options.includeStack && this.stack) {
            data.stack = this.stack;
        }

        if (!this.status) {
            this.status = deriveStatusFromStatusCode(this.statusCode);
        }

        return {
            status: this.status,
            code: this.code,
            message: this.message,
            data: data
        };
    };

    return errorFn;
}
282952
def return_an_error(*args):
    '''
    '''
    list_errors = []
    list_errors.extend(list(args))

    errors = { 'errors': list_errors }
    return errors
1157190
def raise_error(subject, error_class):
    '''
    
    '''
    description = 'Expect {} to be raised'.format(error_class.__name__)
    try:
        subject()
        return (False, description)
    except error_class:
        return (True, description)
158120
def p_error_raise(p):
    
    q = make_number(1, lineno=p.lineno(2))
    r = make_binary(p.lineno(1), 'MINUS',
                    make_typecast(TYPE.ubyte, p[2], p.lineno(1)), q,
                    lambda x, y: x - y)
    p[0] = make_sentence('ERROR', r)
1038487
function WithName(name, Base) {
  let BaseClass =  Base || Therror;
  return class extends BaseClass {
    constructor(err, msg, prop) {
      super(err, msg, prop);
      this.name = name;
    }
  };
}
345471
def class_error(self, input_data, targets, average=True,
                    cache=None, prediction=False):
        

        if cache is not None:
            activations = cache
        else:
            activations = \
              self.feed_forward(input_data, prediction=prediction)

        targets = targets.get().argmax(1)
        class_error = np.sum(activations.get().argmax(1) != targets)

        if average: class_error = float(class_error) / targets.shape[0]
        return class_error
1079056
function CustomError(msg) {
    BaseError.call(this);
    Error.captureStackTrace(this, arguments.callee);
    this.message = msg || defaultMessage || 'An error occurred';
    this.name = name;
    this.code = code;
  }
326210
def raise_error(error):
    
    exc_type = error.get('exc_type')
    if exc_type and exc_type.startswith(ERROR_PREFIX):
        exc_type = exc_type[len(ERROR_PREFIX):]
        exc_cls = ERROR_TYPE_MAP.get(exc_type, DashiError)
    else:
        exc_cls = DashiError

    raise exc_cls(**error)
239269
def error
            error = (self[:error_upgrade] & 0b1111111)
            return nil if error == 0

            err = ::HttpParser.err_name(error)[4..-1] # HPE_ is at the start of all these errors
            klass = ERRORS[err.to_sym]
            err = "#{::HttpParser.err_desc(error)} (#{err})"
            return klass.nil? ? Error::UNKNOWN.new(err) : klass.new(err)
        end
663335
def parsed_top_level_errors(parsed, errors, component_type: str = "") -> Errors:
    

    # Error check
    fn_cnt = 0
    rel_cnt = 0
    nested_cnt = 0
    for key in parsed:
        if parsed[key]["type"] == "Function":
            fn_cnt += 1
        if parsed[key]["type"] == "Relation":
            rel_cnt += 1
        if parsed[key]["type"] == "Nested":
            nested_cnt += 1

    if not component_type:
        if nested_cnt > 1:
            errors.append(
                (
                    "Error",
                    "Too many nested objects - can only have one per BEL Assertion",
                )
            )

        if nested_cnt:
            if rel_cnt > 2:
                errors.append(
                    (
                        "Error",
                        "Too many relations - can only have two in a nested BEL Assertion",
                    )
                )
            elif fn_cnt > 4:
                errors.append(("Error", "Too many BEL subject and object candidates"))

        else:
            if rel_cnt > 1:
                errors.append(
                    (
                        "Error",
                        "Too many relations - can only have one in a BEL Assertion",
                    )
                )
            elif fn_cnt > 2:
                errors.append(("Error", "Too many BEL subject and object candidates"))

    elif component_type == "subject":
        if rel_cnt > 0:
            errors.append(
                ("Error", "Too many relations - cannot have any in a BEL Subject")
            )
        elif fn_cnt > 1:
            errors.append(
                ("Error", "Too many BEL subject candidates - can only have one")
            )

    elif component_type == "object":
        if nested_cnt:
            if rel_cnt > 1:
                errors.append(
                    (
                        "Error",
                        "Too many relations - can only have one in a nested BEL object",
                    )
                )
            elif fn_cnt > 2:
                errors.append(
                    (
                        "Error",
                        "Too many BEL subject and object candidates in a nested BEL object",
                    )
                )
        else:
            if rel_cnt > 0:
                errors.append(
                    ("Error", "Too many relations - cannot have any in a BEL Subject")
                )
            elif fn_cnt > 1:
                errors.append(
                    ("Error", "Too many BEL subject candidates - can only have one")
                )

    return errors
154638
def render_error(exception)
      logger.debug "Exception raised: #{exception.class.name}: #{exception.message}" if logger
      # When a normalised class is present, make sure we
      # convert it to a useable error class.
      normalised_class = exception.class.ancestors.detect do |klass|
        klass < StandardError and error_mapping.has_key?(klass)
      end
      if normalised_class
        mapped = error_mapping[normalised_class]
        if mapped.respond_to?(:call)
          exception = mapped.call(exception)
        else
          exception = mapped.new exception.message
        end
      end
      self.status = lookup_error_status(exception)
      render_json({
        :error             => lookup_error_name(exception).to_s,
        :error_description => lookup_error_message(exception)
      }.merge(lookup_error_metadata(exception)))
    end
1358909
def get_error(response):
    """"""

    errors = {
        400: BadRequestError,
        401: UnauthorizedError,
        403: AccessDeniedError,
        404: NotFoundError,
        429: RateLimitExceededError,
        500: ServerError,
        502: BadGatewayError,
        503: ServiceUnavailableError
    }

    error_class = HTTPError
    if response.status_code in errors:
        error_class = errors[response.status_code]

    return error_class(response)
1184780
def _check_base_classes(base_classes, check_for_type):
    
    return_value = False
    for base in base_classes:
        if base.__name__ == check_for_type:
            return_value = True
            break
        else:
            return_value = _check_base_classes(base.__bases__, check_for_type)
            if return_value is True:
                break

    return return_value
1133285
function aError(errorObject){
  if(!terminal.symbolProgress) terminal.symbolProgress="? ";
  if(errorObject.aux){
    if(!terminal.colors.aux) terminal.colors.aux= chalk.white;
    console.log(terminal.colors.error(terminal.symbolProgress+" Error: "+errorObject.message)+ " " +terminal.colors.aux(errorObject.aux));
    console.log();  
  }
  else{
    console.log(terminal.colors.error(terminal.symbolProgress+" Error: "+errorObject.message));
    console.log();
  }    
}
529469
public void addBaseClasses(Class<?>... baseClasses) {

    if (this.baseClassList == null) {
      this.baseClassList = new ArrayList<>();
    }
    this.baseClassList.addAll(Arrays.asList(baseClasses));
  }
346717
function SpawnError (message, options) {
  return errorBase('SpawnError', function (message, options) {
    this.name = 'SpawnError'
    this.message = message
    this.code = options.code
    this.buffer = options.buffer
  }).call(this, message, options)
}