How to: Display an Exception's Message in Visual Basic
The exception object includes a number of properties that help identify the code location, the type, the Helpfile URL, and the reason for the exception. One of these, the Message property, describes the current exception.
To display the string associated with an exception
Use the Message property to display information about the current exception. This example catches a WebException and displays the associated message.