def check_value_free(result, func, cargs):
count = rt.Error_GetErrorCount()<EOL>if count != <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 result<EOL>
Error checking proper value returns