Error line number

Discussion in 'ASP .Net' started by Sune Hansen, Jul 1, 2003.

  1. Sune Hansen

    Sune Hansen Guest

    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
    Sune Hansen, Jul 1, 2003
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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
    >
    >
    Serdar Kalaycý, Jul 1, 2003
    #2
    1. Advertising

  3. Sune Hansen

    Sune Hansen Guest

    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ý" <> wrote in message
    news:OKAd$...
    > 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" <> wrote in message
    > news:...
    > > 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
    > >
    > >

    >
    >
    Sune Hansen, Jul 1, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGF1bA==?=

    Error Trapping and Error Line Number

    =?Utf-8?B?UGF1bA==?=, Oct 26, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    470
    Hans Kesting
    Oct 27, 2005
  2. Hugo
    Replies:
    10
    Views:
    1,306
    Matt Humphrey
    Oct 18, 2004
  3. kaushikshome
    Replies:
    4
    Views:
    762
    kaushikshome
    Sep 10, 2006
  4. scad
    Replies:
    23
    Views:
    1,162
    Alf P. Steinbach
    May 17, 2009
  5. Marek Stepanek
    Replies:
    12
    Views:
    411
    Peter J. Holzer
    Sep 2, 2006
Loading...

Share This Page