chpicker
Programmer
- Apr 10, 2001
- 1,316
I'm creating a UDF that takes parameters. If an attempt is made to access the function with the wrong parameter type, I want to trigger error 11, "Function argument value, type, or count is invalid". I put this at the beginning of my function:
if vartype(param1)!='C' && parameter is wrong type
error 11
return .F.
endif
This is ok, but it generates the error in my function on the "error" line. What I really want to do is generate the error in the calling program on the line that called my function. How would I go about doing this?
if vartype(param1)!='C' && parameter is wrong type
error 11
return .F.
endif
This is ok, but it generates the error in my function on the "error" line. What I really want to do is generate the error in the calling program on the line that called my function. How would I go about doing this?