Hello,

I'm wondering if there is any way to know where did the error come from. I have this:

vb.net Code:
  1. Try
  2.                 Select Case MathOperation
  3.                     Case Divide
  4.                         'Divide a/b
  5.                     Case Multiply
  6.                         'Multiply a*b
  7.                     Case Tangent
  8.                         'Calculate tangent
  9.                 End Select
  10.             Catch ex As Exception
  11.                 Return "Error"
  12.             End Try

When I say "where did the error come from, is which case threw the error.I know I could check the values and throw an exception, but I want to know which case produced the exception.

I hope it's clear .

Thanks in advance!

PS: That's just an example.