Replies: 3 comments
|
So turns out F# when an exception is thrown inside an asynchronous computation expression (CE), it is not caught by a try statement that surrounds the CE. This is because asynchronous computations are executed on a separate thread or thread pool, and the exception is thrown on that thread, which is outside the scope of the try block. To catch exceptions in an asynchronous computation expression, you can use the Async.Catch function. This function takes an asynchronous computation expression as an argument and returns a new asynchronous computation expression that catches any exceptions thrown by the original computation. |
0 replies
|
It's still not working if I use Async.Catch |
0 replies
|
Can you share a full code sample? Have you tried using native F# task CE's? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
is it because I am black
All reactions