I usually do something like the example below when I need to return error messages from a function, if no errors occur I just return an empyty string. Is this best practice, or are there alternatve ways of returning error messages from functions?
Function Test() as String ' Do something If error occured Then Return 'Some error message' Else Return '' End Functon
Instead of returning an error message you should throw an exception that contains the error message.
Here’s a quick overview: http://www.vbdotnetheaven.com/UploadFile/rajeshvs/dotnetException04162005022135AM/dotnetException.aspx