Hi, Guys
I appear to have a problem when I insert a resummable sub, within a try/catch block i.e.
Could be doing something wrong (which for me is very likely) , but I have tried it with some test code and it Try/Catch does not work with Wait for.
Any comments please.
Kind regards
Dave
I appear to have a problem when I insert a resummable sub, within a try/catch block i.e.
Problem with wait for:
' This will work Ok if the is error in DoSomething() - '
Try
a = DoSomething(...)
Catch
Log(LastException) ' Catch works and traps the error
End Try
' However if DoSomething() returns resummable and an error occurs in DoSomething()
' then and exception is throw in the DoSomething() sub and the App halts with an exception report. i.e.
Try
wait for (DoSomething(...)) complete( a as int) ' Exception thrown by DoSomething() and App halts.
Catch
Log(LastException) ' This does not catch the exception in DoSomething().
End Try
Could be doing something wrong (which for me is very likely) , but I have tried it with some test code and it Try/Catch does not work with Wait for.
Any comments please.
Kind regards
Dave