Torna al Thread
Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click
TestSub()
TestFunction()
End Sub
Private Sub TestSub()
Try
Throw New ApplicationException("Errore!")
Catch ex As Exception
Gest_Err(ex.Message, Reflection.MethodBase.GetCurrentMethod().Name)
End Try
End Sub
Private Function TestFunction() As Boolean
Try
Throw New ApplicationException("Errore!")
Catch ex As Exception
Gest_Err(ex.Message, Reflection.MethodBase.GetCurrentMethod().Name)
End Try
End Function
Private Sub Gest_Err(ByVal Messaggio As String, ByVal NomeMetodo As String)
MessageBox.Show(String.Format("Errore: {0} NomeMetodo: {1}", Messaggio, NomeMetodo))
End Sub