如何更快更好地调试ASP程序代码?
来源:asp之家 时间:2009-11-23 20:13:00
asp自定义错误显示方法:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<title>asp教程之程序调试高手</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<%@ LANGUAGE="VBScript" %>
<%
Response.Buffer = True
' 打开页面缓冲
On Error Resume Next
' 打开错误处理
%>
<%
If Err.Number <> 0 Then
' 错误处理
Response.Clear
' 清除缓冲区
%>
</head>
<body>
<p><%= Err.Number %><br>
<%= Err.Line %><br>
</p>
</font><div align="center"><center>
<table border="0" cellspacing="0" width="600" height="166">
<tr>
<td height="61"><p align="center">精彩春风之ASP调试错误信息显示</td>
</tr>
<tr>
<td height="106"><div align="center"><center><table border="1" cellspacing="0" width="400">
<tr>
<td colspan="2" width="400"><p align="center"><font
color="red">警告:本页面发生错误 </font></td>
</tr>
<tr>
<td width="96">错误号</td>
<td width="376"> </td>
</tr>
<tr>
<td width="96">错误描述<%=
Err.Description %></td>
<td width="376"> </td>
</tr>
<tr>
<td width="96">错误源<%= Err.Source
%></td>
<td width="376"> </td>
</tr>
<tr>
<td width="96">错误发生行
</td>
<td width="376"> </td>
</tr>
</table>
</center></div></td>
</tr>
</table>
</center></div>
</body>
</html>
<%
End If
%>