exception handling
Rethrowing Exceptions
There's a bit more subtlety to rethrowing exceptions than most developers realize. Although this topic is covered very nicely at The .NET Guy blog, here's another example: Try session = smgr.getSession(_strDocbaseName) Catch ex As Exception If ex.Message.IndexOf("authentication failed") > 0