C
Charles A. Lackman
Hello,
I have created a thread that writes data from a memorystream to the
harddrive. If the user, during the write decides to cancel the operation, I
call Abort on the thread.
i.e.
Private Sub WriteToDiskButton_Click
MyThread= New Threading.Thread(AddressOf WriteToDisk)
MyThread.Start()
End Sub
Private Sub WriteToDisk
Try
'do stuff
Catch Ex as System.Threading.ThreadAbortException
End Try
End Sub
Private Sub AbortButton_Click
MyThread.Abort
End Sub
When the Abort takes place I get two Abort Exceptions, I am able to catch
the fist one but how do I catch both exceptions so the user is not aware of
them.
Chuck
I have created a thread that writes data from a memorystream to the
harddrive. If the user, during the write decides to cancel the operation, I
call Abort on the thread.
i.e.
Private Sub WriteToDiskButton_Click
MyThread= New Threading.Thread(AddressOf WriteToDisk)
MyThread.Start()
End Sub
Private Sub WriteToDisk
Try
'do stuff
Catch Ex as System.Threading.ThreadAbortException
End Try
End Sub
Private Sub AbortButton_Click
MyThread.Abort
End Sub
When the Abort takes place I get two Abort Exceptions, I am able to catch
the fist one but how do I catch both exceptions so the user is not aware of
them.
Chuck