def error_check(code):
    if code == 0:
        return
    else:
        error_string = "code {0}: {1}".format(code, error_buffer.value.decode())
        try:
            raise _ERRORS[code - 1](error_string)
        except __HOLE__:
            raise DrmaaException(error_string)

# da vedere: NO_RUSAGE, NO_MORE_ELEMENTS
dataset/ETHPy150Open pygridtools/drmaa-python/drmaa/errors.py/error_check