J
John
The following code has run-time error on "divide by 0" error. I expect
"do the work<br>" will not print in the browser, since it happen after
the code
that cause the error. However, this is the output: any ideas why?? Or
this is the nature of ASP scripting language that is being executed in
sequential order? Please advice. thanks!!
//////// output ///////////////////////////
before error
do the work
Division by zero
after error handling
/////////// code ///////////////////////////
<%
On Error Resume Next
Response.write "before error<br>"
dblValue = 1/aa '== Will cause a divide by 0 error
Response.Write "do the work<br>"
If Err.Number <> 0 Then
Response.write Err.Description & "<br>"
End If
Response.Write "after error handling<br>"
%>
////////////////////////////////////////////
"do the work<br>" will not print in the browser, since it happen after
the code
that cause the error. However, this is the output: any ideas why?? Or
this is the nature of ASP scripting language that is being executed in
sequential order? Please advice. thanks!!
//////// output ///////////////////////////
before error
do the work
Division by zero
after error handling
/////////// code ///////////////////////////
<%
On Error Resume Next
Response.write "before error<br>"
dblValue = 1/aa '== Will cause a divide by 0 error
Response.Write "do the work<br>"
If Err.Number <> 0 Then
Response.write Err.Description & "<br>"
End If
Response.Write "after error handling<br>"
%>
////////////////////////////////////////////