'Raise an exception from the OpenSSL error queue or that was previously
captured whe running a callback.'

def raise_if_problem(self):

    if self._problems:
        try:
            _raise_current_error()
        except Error:
            pass
        raise self._problems.pop(0)
