Error Handling

Discussion in 'ASP General' started by Bruce Thornbury, Dec 8, 2005.

  1. I've seen several posts about this but haven't seen an answer:

    I'm capturing errors using ON ERROR RESUME NEXT. VBScript's default error
    object works fine but lacks the file, line, and code that the
    Server.GetLastError function gives you. Unfortunately, I can't get the
    Server.GetLastError to work properly.

    Simplistic code:

    if err.number <> 0 then
    Response.Write err.number & " - " & err.description & "<br>"
    end if

    this works fine. If I use:

    dim oAspErr
    if err.number <> 0 then
    set oAspErr = Server.GetLastError
    Response.Write "Description: " & oAspErr.Description
    end if

    the only output I get is the word "Description:". Can someone shed some
    light for me? Thanks.

    Bruce
     
    Bruce Thornbury, Dec 8, 2005
    #1
    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. Kenneth Keeley

    Error Handling

    Kenneth Keeley, Jul 1, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    388
    Kenneth Keeley
    Jul 1, 2003
  2. VSK
    Replies:
    1
    Views:
    805
    Alvin Bruney
    Jul 29, 2003
  3. Mark Tarver
    Replies:
    22
    Views:
    1,337
    J Kenneth King
    Apr 26, 2009
  4. Peter
    Replies:
    34
    Views:
    1,976
    James Kanze
    Oct 17, 2009
  5. Iñaki Baz Castillo
    Replies:
    1
    Views:
    202
    Iñaki Baz Castillo
    Apr 15, 2008
Loading...

Share This Page