rv_Error e = rv_call(&result,a,b,c);
if ( e!=RV_OK ) {
fprintf(stderr,"error %d, %s\n", e, rv_ErrorText(e));
exit(1);
}
COM's HRESULT return code takes this even further, dividing the return code into specific bit fields, each with a specific function.