Trapping for null string passed to function
Is it possible to trap for a null string passed to a function? In partial answer to this, I have verified that a combination of try-catch-endtry and GetRTError(1) can do this. (Possibly GetRTError(1) alone will suffice, but I haven't tested this.) However, if the Debugger is enabled and DebugOnError is enabled, the Debugger window will still open, albeit with no error message. Is there a simple way around this situation? I have noted that a judicious use of DebuggerOptions operation can prevent this, but this seems to be a bit invasive.
Wed, 07/27/2011 - 02:14 pm
My desire was to make a general purpose function as bullet proof as possible and give it the ability to gracefully exit from a null string input.
The only previous discussion to this sort of problem that I can find is here, but there was no answer.