Ejemplo n.º 1
0
    def _check_error(cls, ret):
        # type: (int) -> None
        if ret != lib.olm_error():
            return

        raise OlmVerifyError("{}".format(
            ffi.string(lib.olm_utility_last_error(
                cls._utility)).decode("utf-8")))
Ejemplo n.º 2
0
    def _check_error(cls, ret, error_class):
        # type: (int, Type) -> None
        if ret != lib.olm_error():
            return

        raise error_class("{}".format(
            ffi.string(lib.olm_utility_last_error(
                cls._utility)).decode("utf-8")))