Server.GetLastError() does not work?!?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ASP.Confused

    Server.GetLastError() does not work?!?

    I have a program that I'm trying to get error detection to work with. To
    test it, I attempted using the following mispelled CreateObject statement
    (which should cause an error):

    Set myObject = CreateObject("A DODB.Connectiom ")

    Err.Number shows 429, which is normal. But Server.GetLastE rror reports no
    error!

    I would like to have line numbers and the line of source code, along with
    the file name, of the offending code.

    Any suggestions?


  • Aaron [SQL Server MVP]

    #2
    Re: Server.GetLastE rror() does not work?!?

    Server.GetLastE rror() is only available in a custom 500 error handler page.

    --
    Please contact this domain's administrator as their DNS Made Easy services have expired.

    (Reverse address to reply.)




    "ASP.Confus ed" <anonymous@> wrote in message
    news:eRmsvkYeEH A.236@tk2msftng p13.phx.gbl...[color=blue]
    > I have a program that I'm trying to get error detection to work with. To
    > test it, I attempted using the following mispelled CreateObject statement
    > (which should cause an error):
    >
    > Set myObject = CreateObject("A DODB.Connectiom ")
    >
    > Err.Number shows 429, which is normal. But Server.GetLastE rror reports no
    > error!
    >
    > I would like to have line numbers and the line of source code, along with
    > the file name, of the offending code.
    >
    > Any suggestions?
    >
    >[/color]


    Comment

    • ASP.Confused

      #3
      Re: Server.GetLastE rror() does not work?!?

      Any ideas on how I can get the line number of the command that has the error
      on it without using a custom HTTP 500-100 error handler page? I cannot set
      my site to use it, since it is hosted by another company (and they can't
      change it because we're on a secure server sharing one certificate, and
      changing it for us would change it for everyone.)



      "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
      news:O8WOjxYeEH A.3132@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Server.GetLastE rror() is only available in a custom 500 error handler[/color]
      page.[color=blue]
      >
      > --
      > http://www.aspfaq.com/
      > (Reverse address to reply.)
      >
      >
      >
      >
      > "ASP.Confus ed" <anonymous@> wrote in message
      > news:eRmsvkYeEH A.236@tk2msftng p13.phx.gbl...[color=green]
      > > I have a program that I'm trying to get error detection to work with.[/color][/color]
      To[color=blue][color=green]
      > > test it, I attempted using the following mispelled CreateObject[/color][/color]
      statement[color=blue][color=green]
      > > (which should cause an error):
      > >
      > > Set myObject = CreateObject("A DODB.Connectiom ")
      > >
      > > Err.Number shows 429, which is normal. But Server.GetLastE rror reports[/color][/color]
      no[color=blue][color=green]
      > > error!
      > >
      > > I would like to have line numbers and the line of source code, along[/color][/color]
      with[color=blue][color=green]
      > > the file name, of the offending code.
      > >
      > > Any suggestions?
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Aaron [SQL Server MVP]

        #4
        Re: Server.GetLastE rror() does not work?!?

        No, I don't think line number is available to the err collection using the
        stock asp error handling.

        --
        Please contact this domain's administrator as their DNS Made Easy services have expired.

        (Reverse address to reply.)



        "ASP.Confus ed" <anonymous@> wrote in message
        news:%23R5VNvZe EHA.3412@TK2MSF TNGP11.phx.gbl. ..[color=blue]
        > Any ideas on how I can get the line number of the command that has the
        > error
        > on it without using a custom HTTP 500-100 error handler page? I cannot
        > set
        > my site to use it, since it is hosted by another company (and they can't
        > change it because we're on a secure server sharing one certificate, and
        > changing it for us would change it for everyone.)[/color]


        Comment

        Working...