Error Handling

  • Thread starter Bruce Thornbury
  • Start date
B

Bruce Thornbury

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
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top