3초기억력

ASP - 에러코드 출력하기, err.number, err 본문

플밍_ASP

ASP - 에러코드 출력하기, err.number, err

잠수콩 2011. 4. 6. 18:19
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


on Error Resume Next

asp 코딩 어쩌구 저쩌구~~~
asp 코딩 어쩌구 저쩌구~~~
asp 코딩 어쩌구 저쩌구~~~
asp 코딩 어쩌구 저쩌구~~~
 

If Err.Number <> 0 then
Response.Write Err.Number & " - 에러 번호<BR>"
Response.Write Err.Description & " - 에러 메시지<BR>"
Response.Write Err.Source & " - 에러 출처<BR>"
Response.Write Err.NativeError & " - DB 에러번호<BR>"
Response.Write Err.HelpFile & " - 에러 파일<BR>"
Response.Write Err.HelpContext & " - 에러 Context<BR>"
End If

Note that the following two lines of code are the same:
아래 2개의 코딩은 같다. 

If Err.Number <> 0 Then
If Err <> 0 Then




또다른 참고 URL : http://support.microsoft.com/kb/300043/ko

나누기에 대한..
X=Cint("x")
Y=(3/0) 
Response.Write Err.Description

 
 
이 코드는 0으로 나누기 오류 메시지를 표시하지만 형식 불일치 문제에 대한 메시지는 표시하지 않습니다.


 

<%
' You can clear the error information in the Err object by calling
' the clear method:
Err.Clear

' You can also raise an error of your own if you need to:
Err.Raise 1, "ASP 101", "This is a custom error that I raised!"
%>

<p>
Error details:
</p>
<table border="1">
	<tr>
		<td>Err.Source</td>
		<td><%= Err.Source %></td>
	</tr>
	<tr>
		<td>Err.Number</td>
		<td><%= Err.Number %></td>
	</tr>
	<tr>
		<td>Err.Description</td>
		<td><%= Err.Description %></td>
	</tr>
</table>

<%
' Turn "error-handling" back off... after the next line the
' script will break as normal if any errors happen.
On Error Goto 0
%> 


Comments