Error line number

  • Thread starter Thread starter Sune Hansen
  • Start date Start date
S

Sune Hansen

Hi Newsgroup,

A very short question:
If have a try/catch structure. In the catch part I would like to get the
line number where the exception has occured? Can I get this information and
if so how?

Regards,
Sune
 
As far as I know; after compilation, errors won't show line numbers because,
they're not in Source Code form. There may be some difference in CLR that I
don't know.

Serdar KALAYCI
 
I was affraid that this would be the case.
However I have found that I can get the line number information from the
StackTrace like this:

Catch e As Exception
Response.Write(e.StackTrace)
End Try

/Sune
 
Back
Top