def ok(no_exit, func, *args, **kwargs):
ret = func(*args, **kwargs)<EOL>if no_exit or ret >= <NUM_LIT:0>:<EOL><INDENT>return ret<EOL><DEDENT>reason = errmsg[abs(ret)]<EOL>error('<STR_LIT>'.format(func.__name__, ret, reason))<EOL>
Exit if `ret` is not OK (a negative number).