p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   Error Handling (http://p2p.wrox.com/showthread.php?t=6144)

zaeem November 13th, 2003 11:55 PM

Error Handling
 
Hello everybody, I am new to ASP,I need help regarding Error Handling in ASP,In Visual Basic I know Little about it the syntax is
==============================
on error to go err_hand
err_hand:
do anything
=============================
But how can we do the same in asp?
Any help will be appreciated
Bye

Zaeem Sherazi

alyeng2000 November 14th, 2003 02:30 AM

if you are using vbscript as ASP language you could use the err object :)

try this code sample for error handling

On Error Resume Next

CODE here

If Err.Number <> 0 Then
Response.Clear
Response.Write "There has been an error."
Response.Write "statement that caused the problem: "
Response.End
End If

Ahmed Ali
Software Developer

planoie November 14th, 2003 10:42 AM

This thread is mirrored over here.

Peter
------------------------------------------------------
Work smarter, not harder.


All times are GMT -4. The time now is 06:54 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.