' 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