Quote:
Originally Posted by junglejet
Yes, I could ignore the exception, but there are also valid exceptions when thre is a 404 or so. That's why I prefer to correctly have the empty string processed.
|
To me that looks like you are getting the error thrown in main when you call GetText and do not get a return string. If your code is this:
and if GetText doesn't return anything (which I believe is what is happening - others can jump in and correct me - because your code exits with "return" instead of "return string") then it seems to throw an error on main.
I think a 404 error would still return a string and not hit your error code. I think the error code is only triggered if the http call gets nothing (like on a time-out)
I've had good luck always returning the variable string in GetText and then passing the return value to another sub for evaluation.