Click to See Complete Forum and Search --> : How to test ERROR


yasuru
04-05-2004, 01:15 AM
Hi!

I have put the following code in my asp to check error. Now I want to test this by delibrately generating some error, so that it should show me the err.description also. Can somebody please help me how to do this. Thanks

Herez the code I am using:

<%
If(err.number <> 0) Then

Response.write("<strong>" & "Error:" & err.description & "</strong>")
end if
%>

buntine
04-05-2004, 01:25 AM
You havent specified what err is. Didnt i tell you last time, you have to create an AspError object.

Regards.

yasuru
04-05-2004, 07:07 AM
I will be greatful to you if you help me with the code please, I mean how to specify err.

Thanks

buntine
04-05-2004, 07:47 AM
Normally, err would be the name of an object which you have created..

ASPError is an object of ASP 3.0

Look at the following examples:

- http://www.w3schools.com/asp/asp_ref_error.asp
- http://www.microsoft.com/windows2000/en/server/iis/default.asp?url=/windows2000/en/server/iis/htm/asp/vbob1dtg.htm
- http://www.psacake.com/web/gw.asp

Regards,
Andrew Buntine.

yasuru
04-05-2004, 09:39 PM
Thanks very much, I checked the sites you mentioned. Thats really great.