Is it possible to handle an exception thrown in an resumable sub?
Example:
Since the second sub already returned when the exeption is thrown, the try...catch block can't handle it. The app crashes.
Is it possible to handle something like that?
Example:
B4X:
Sub throwAndResumableSubTest
Log("Aufrufer startet")
Try
Wait For (resumableAndThrowing) Complete
Catch
Log(LastException)
End Try
Log("Aufrufer endet")
End Sub
Sub resumableAndThrowing As ResumableSub
Log("ResumableSub startet")
Sleep(100)
Dim ex As ExceptionEx
ex.Initialize("Meine eigene Ausnahme.")
ex.Throw
Log("ResumableSub endet")
Return 0
End Sub
Since the second sub already returned when the exeption is thrown, the try...catch block can't handle it. The app crashes.
Is it possible to handle something like that?