Exemplo n.º 1
0
    def assert_no_error(self):
        ''' Check if there was an error after the last error.
        If there was, then throw an exception.

        :throws DatabaseException: If there was a problem with the iterator
        '''
        error = new_native_string()
        LDB.leveldb_iter_get_error(error, get_reference_to(error))
        message = as_python_string(error)
        if message:
            raise DatabaseException(message)