<%@ Page Language="vb" %>
<html>
<head>
<script runat="server">
Sub Page_Load()
Try
ThrowMeAnException
Catch HttpEx As HttpException
myMessage.Text = "ERROR:</br>"
myMessage.Text &= "Message: " & HttpEx.Message & "</br>"
myMessage.Text &= "Stack Trace: " & HttpEx.StackTrace & "</br>"
End Try
End Sub
Sub ThrowMeAnException()
Throw New HttpException("Threw an error from ThrowMeAnException")
End Sub
</script>
</head>
<body>
<asp:label id="myMessage" forecolor="red" runat="server"/>
</body>
</html>
|