>Define Class test as Custom > Protected RetVal > Protected Procedure RetVal_Assign(tnRetVal) > If tnRetVal != 0 > Error "Error #" + Trans(tnRetVal) > EndIf > EndProc > Procedure SomeMethod() > This.RetVal = SomeAPIFunction() > EndProc >EndDefine >>However this code will generate an error within line with Error statement, but I want to generate an error within line where API function is called. Any ideas?
cErrorCommand = "ERROR "+ALLTRIM(STR(nErrorNummer))+" "+cErrorArgument RETURN &cErrorCommandYou (well I ...) never know what happens ...
&This.RetVal = SomeAPIFunction()
the return value or filled with "" (hence no command to perform) or the Error command. I don't know how to deal with the real return value though.