Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Error line number

Reply
Thread Tools

Error line number

 
 
Sune Hansen
Guest
Posts: n/a
 
      07-01-2003
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


 
Reply With Quote
 
 
 
 
Serdar Kalaycı
Guest
Posts: n/a
 
      07-01-2003
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

"Sune Hansen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Sune Hansen
Guest
Posts: n/a
 
      07-01-2003
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

"Serdar Kalaycı" <(E-Mail Removed)> wrote in message
news:OKAd$(E-Mail Removed)...
> 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
>
> "Sune Hansen" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Trapping and Error Line Number =?Utf-8?B?UGF1bA==?= ASP .Net 3 10-27-2005 11:49 AM
OT: Number Nine, Number Nine, Number Nine Frisbee® MCSE 37 09-26-2005 04:06 PM
Read a file line by line with a maximum number of characters per line Hugo Java 10 10-18-2004 11:42 AM
bus error with printf line included, error without printf line? ben C Programming 4 06-26-2004 04:42 PM
Interrogating string for number of characters, response.writing identical number of characters on new line Ken Fine ASP General 2 02-05-2004 03:40 AM



Advertisments