Catching exc as Exceptions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dougancil
    Contributor
    • Apr 2010
    • 347

    Catching exc as Exceptions

    I have the following code

    Code:
     Catch Exc As Exception
                    'We encountered a problem
                    message.Text = "Your file was not in the correct format. Please contact MSB Customer Service at 512-467-5200."
                End Try
    and while that presents a friendlier error message to a user, I've forgotten how to show me the "real" error. Can someone please remind me how to do that.

    Thanks

    Doug
  • dougancil
    Contributor
    • Apr 2010
    • 347

    #2
    I solved this ... intellisense is a great feature if you let it do its thing.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Glad you solved the problem :)

      Exception.Stack Trace and Exception.Messa ge give you details about the exception itself.

      In your case you probably used something like:
      Code:
      Try 
       '....
      Catch Exc As Exception
        message.Text = Exc.Message + "  <br />" +  Exc.StackTrace
      End Try
      Last edited by Frinavale; Aug 5 '10, 07:25 PM.

      Comment

      Working...