Error Trapping

<% On Error Resume Next %>
The above line turns on VBScript error trapping. In doing so, whenever a line of script produces an error the processing continues on to the next line of the script.
<%
 If err.Number <> 0 Then
 Response.Write "Number = " & err.Number & "<p>"
 Response.Write "Description = " & err.Description & "<p>"
 Response.Write "Source = " & err.Source
 err.Clear
 %>

The above prints the error information.



asp vbscript error error trap


Back To Top
© 1998 - 2024 psacake.com
Version 7.21 | Advertise on this site