p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

asp_discuss thread: Server.GetLastError

Message #1 by "savi" <savi_kv@h...> on Tue, 21 Jan 2003 22:51:18
I am trying to catch error using following method.
Set objASPError = Server.GetLastError

It is not returning any error message and also it is displaying next part 
of the calling page.

If I use following statement, variable not found is displayed.
Why it is so?


Sub HandleErrors(sScript,sFunction)
Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP
   'if Not Err.Number=0 then 
   ' response.write Err.Description
   'end if		

   Set objASPError = Server.GetLastError
   If objASPError.Number<>0  Then
      Response.Write "sdfsdf"
      Response.WRITE (objASPError.line)
   End If

  Return to Index