G
Guest
Hello
I'm trying to use a Server.Transfer in a try-catch (I cannot put it outside the Try-Catch as it is nested deep within a component that is called in a try-catch loop)
The problem is that the Server.Transfer always throws the ThreadAbortException. MSDN acknowledges that this is a unque exception that will be automatically rethrown - i.e. it can't be swallowed. Does anyone know if there is extar code I can write (maybe something in the threading namespace) that effectively swallows this so it doesn't rethrow
For example
Tr
Tr
Server.Transfer("ServB.aspx"
Catch ex As System.Threading.ThreadAbortExceptio
'want to kill thread so it doesn't rethrow to "Second Exception handler
Catch ex As Exceptio
Throw e
End Tr
Catch ex As Exceptio
'Second Exception handle
strEx = ex.Messag
End Tr
Thanks
Mark
I'm trying to use a Server.Transfer in a try-catch (I cannot put it outside the Try-Catch as it is nested deep within a component that is called in a try-catch loop)
The problem is that the Server.Transfer always throws the ThreadAbortException. MSDN acknowledges that this is a unque exception that will be automatically rethrown - i.e. it can't be swallowed. Does anyone know if there is extar code I can write (maybe something in the threading namespace) that effectively swallows this so it doesn't rethrow
For example
Tr
Tr
Server.Transfer("ServB.aspx"
Catch ex As System.Threading.ThreadAbortExceptio
'want to kill thread so it doesn't rethrow to "Second Exception handler
Catch ex As Exceptio
Throw e
End Tr
Catch ex As Exceptio
'Second Exception handle
strEx = ex.Messag
End Tr
Thanks
Mark