def check_return(result, func, cargs):
if result != <NUM_LIT:0>:<EOL><INDENT>s = rt.Error_GetLastErrorMsg().decode()<EOL>msg = '<STR_LIT>' %(func.__name__, s)<EOL>rt.Error_Reset()<EOL>raise RTreeError(msg)<EOL><DEDENT>return True<EOL>
Error checking for Error calls