Raises ogg.error
191746
def _post_tags(self, fileobj):
        """"""

        page = OggPage.find_last(fileobj, self.serial, finishing=True)
        if page is None:
            raise OggVorbisHeaderError
        self.length = page.position / float(self.sample_rate)
794200
def _make_error(index, code, errmsg, operation):
    
    return {
        _UINDEX: index,
        _UCODE: code,
        _UERRMSG: errmsg,
        _UOP: operation
    }
27774
def error(*tokens: Token, **kwargs: Any) -> None:
    
    tokens = [bold, red, "Error:"] + list(tokens)  # type: ignore
    kwargs["fileobj"] = sys.stderr
    message(*tokens, **kwargs)
1104619
def do_gn(self, arg):
        
        if self.cmdprefix:
            raise CmdError("prefix not allowed")
        if arg:
            raise CmdError("too many arguments")
        if self.lastEvent:
            self.lastEvent.continueStatus = win32.DBG_EXCEPTION_NOT_HANDLED
        return self.do_go(arg)
856113
def _check_gle_response(result):
    """"""
    # Did getlasterror itself fail?
    _check_command_response(result)

    if result.get("wtimeout", False):
        # MongoDB versions before 1.8.0 return the error message in an "errmsg"
        # field. If "errmsg" exists "err" will also exist set to None, so we
        # have to check for "errmsg" first.
        raise WTimeoutError(result.get("errmsg", result.get("err")),
                            result.get("code"),
                            result)

    error_msg = result.get("err", "")
    if error_msg is None:
        return result

    if error_msg.startswith("not master"):
        raise NotMasterError(error_msg, result)

    details = result

    # mongos returns the error code in an error object for some errors.
    if "errObjects" in result:
        for errobj in result["errObjects"]:
            if errobj.get("err") == error_msg:
                details = errobj
                break

    code = details.get("code")
    if code in (11000, 11001, 12582):
        raise DuplicateKeyError(details["err"], code, result)
    raise OperationFailure(details["err"], code, result)
202688
def raise_exception(self, node, exc=None, msg='', expr=None,
                        lineno=None):
        """"""
        if self.error is None:
            self.error = []
        if expr is None:
            expr = self.expr
        if len(self.error) > 0 and not isinstance(node, ast.Module):
            msg = '%s' % msg
        err = ExceptionHolder(node, exc=exc, msg=msg, expr=expr, lineno=lineno)
        self._interrupt = ast.Break()
        self.error.append(err)
        if self.error_msg is None:
            self.error_msg = "at expr='%s'" % (self.expr)
        elif len(msg) > 0:
            self.error_msg = msg
        if exc is None:
            try:
                exc = self.error[0].exc
            except:
                exc = RuntimeError
        raise exc(self.error_msg)
1256327
def context(src):
    
    try:
        yield
    except Exception:
        etype, err, tb = sys.exc_info()
        msg = 'An error occurred with source id=%s. Error: %s'
        msg %= (src.source_id, err)
        raise_(etype, msg, tb)
1374352
def handle_os_exceptions():
    
    try:
        yield

    # Convert pycosio exception to equivalent OSError
    except ObjectException:
        exc_type, exc_value, _ = exc_info()
        raise _OS_EXCEPTIONS.get(exc_type, OSError)(exc_value)

    # Re-raise generic exceptions
    except (OSError, same_file_error, UnsupportedOperation):
        raise

    # Raise generic OSError for other exceptions
    except Exception:
        exc_type, exc_value, _ = exc_info()
        raise OSError('%s%s' % (
            exc_type, (', %s' % exc_value) if exc_value else ''))
1263469
def maybe_raise(cls, error_type, ignores=None):
        
        ignores = set(ignores or [])
        ignores.add(ErrorType.Ok)
        if error_type not in ignores:
            raise LibError(error_type)
556832
def raises(cls, sender, attrname, error, args=ANYTHING, kwargs=ANYTHING):
        ""
        def raise_error():
            raise error
        return cls(sender, attrname, returns=Invoke(raise_error), args=ANYTHING, kwargs=ANYTHING)
827928
def raiseError(cls, message):
        
        error_message = "[error] %s" % message
        if cls.__raise_exception__:
            raise Exception(error_message)

        cls.colorprint(error_message, Fore.RED)
        sys.exit(1)
491435
def _raise_exception(cls, reason, data=None):
    
    text_dict = {
        "error": reason
    }

    if data is not None:
        text_dict["errors"] = data

    raise cls(
        text=json.dumps(text_dict),
        content_type="application/json"
    )
892775
def error(msg, log_file=None):
        """"""
        UtilClass.print_msg(msg + os.linesep)
        if log_file is not None:
            UtilClass.writelog(log_file, msg, 'append')
        raise RuntimeError(msg)
221438
def raise_potential_error!(error_code)
      return if error_code.zero? || error_code == 401 || error_code == 101

      Filemaker::Errors.raise_error_by_code(error_code)
    end
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)
521234
def raise_on_wrong_settings(self):
        
        self.__ensure_dir_exists(self.working_directory, 'working directory')
        for idir in self.include_paths:
            self.__ensure_dir_exists(idir, 'include directory')
        if self.__xml_generator not in ["castxml", "gccxml"]:
            msg = ('xml_generator("%s") should either be ' +
                   '"castxml" or "gccxml".') % self.xml_generator
            raise RuntimeError(msg)
1297291
def syntax_error(message)
      column = @orig_line && @line ? @orig_line.size - @line.size : 0
      raise SyntaxError.new(message, file_path, @orig_line, @lineno, column)
    end