Discussion Issue.

I have been internally debating how a properly constructed UDF should return data including errorcodes and would like input from the board.

Is it as simple as always using "Exit x"?

In some of my UDF's I return an array where the first array element is the value expected to be returned by the UDF and the second and third are the errorcode and error text that may have been encountered by an function or COM call internal to the UDF. For the sake of consistent development, is there a methodology that is preferred over others?

Should a UDF define custom error conditions and use Exit to set @error to a non Microsoft OS error number?

Any and all thoughts are expected.
_________________________
Home page: http://www.kixhelp.com/hb/