The snippet demonstrates how to compose simple asynchronous functions and how to use try .. with to handle exceptions in asynchronous workflows.
35 people like thisPosted: 13 years ago by Tomas Petricek
A simple active pattern that allows you to match WebExceptions by HttpStatusCode. I find it useful for quick scripts where I only need WebClient and don't have to get involved with WebRequest etc.
12 people like thisPosted: 12 years ago by Leaf Garland
.Net exceptions carry with them lots of useful metadata that are not directly user modifiable. In certain applications, such as distributed or symbolic execution it might be reasonable to need to modify such metadata. The following pattern is a proposal on effectively decoupling an exception from its contextual metadata, as well as a way of defining exception hierarchies while avoiding all the ISerializable boilerplate.
1 people like thisPosted: 10 years ago by Eirik Tsarpalis
Raises an exception again after attempting to run one or more handlers. Any failures in the handlers will be put into a new AggregateExeption. If no additional errors are raised, the original exception will be re-raised with a preserved stack trace.
4 people like thisPosted: 13 years ago by Sebastian Good
An extension of MailboxProcessor that catches all unhandled exceptions (in the body of the mailbox processor) and reports them using an event. Otherwise, the public interface is the same as for MailboxProcessor.
5 people like thisPosted: 12 years ago by Tomas Petricek
An extension of MailboxProcessor that catches all unhandled exceptions, and ensures that the user-provided function is run repeatedly until it returns normally. Based on the HandlingMailbox defined by Tomas Petricek: fssnip.net/cj
7 people like thisPosted: 9 years ago by Anthony Perez