D
David Lozzi
Howdy,
I have an error mod in my app that emails me whenever there is an error. I
use try..catch to capture the error. It works great, I love it, except for
this one minor issue. Whenever there is a script that processes some data
then issues a response.redirect() I get "Thread was being aborted" emailed
to me. Below is an example of a script of where the error is occuring. It
doesn't affect the end user at all, but I just keep getting the emails and
I'm going live with this today, which means more emails
Try
sqlconn.Open()
If sqlcomm.ExecuteNonQuery > 0 Then
lblError.Text = ""
sqlconn.Close()
Response.Redirect("eventhotels.aspx?EID=" & EID)
Else
sqlconn.Close()
lblError.Text = EmailError("eventhoteladd", "savehotel",
"nothing to update.")
End If
Catch ex As Exception
sqlconn.Close()
lblError.Text = EmailError("eventhoteladd", "savehotel",
ex.Message)
End Try
I tried putting the sqlconn.close into the finally statement but still for
the same results.
Thanks!!
I have an error mod in my app that emails me whenever there is an error. I
use try..catch to capture the error. It works great, I love it, except for
this one minor issue. Whenever there is a script that processes some data
then issues a response.redirect() I get "Thread was being aborted" emailed
to me. Below is an example of a script of where the error is occuring. It
doesn't affect the end user at all, but I just keep getting the emails and
I'm going live with this today, which means more emails
Try
sqlconn.Open()
If sqlcomm.ExecuteNonQuery > 0 Then
lblError.Text = ""
sqlconn.Close()
Response.Redirect("eventhotels.aspx?EID=" & EID)
Else
sqlconn.Close()
lblError.Text = EmailError("eventhoteladd", "savehotel",
"nothing to update.")
End If
Catch ex As Exception
sqlconn.Close()
lblError.Text = EmailError("eventhoteladd", "savehotel",
ex.Message)
End Try
I tried putting the sqlconn.close into the finally statement but still for
the same results.
Thanks!!