Error line number

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
 
S

Serdar Kalaycý

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
 
S

Sune Hansen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top