def handle_openssl_error(result, exception_class=None):

    if result > 0:
        return

    if exception_class is None:
        exception_class = OSError

    error_num = libcrypto.ERR_get_error()
    buffer = buffer_from_bytes(120)
    libcrypto.ERR_error_string(error_num, buffer)

    # Since we are dealing with a string, it is NULL terminated
    error_string = byte_string_from_buffer(buffer)

    raise exception_class(_try_decode(error_string))
Print a title with a newline.
dataset/ETHPy150Open wbond/oscrypto/oscrypto/_openssl/_libcrypto.py/handle_openssl_error--crossover with--dataset/ETHPy150Open christabor/MoAL/MOAL/helpers/display.py/print_nl