Snippets tagged error handling

  • "Guard" helper function for railway error handling

    Defines a "guard" function for railway-style error handing which allows you to concisely verify a condition when handling errors using Choice<'T, 'Error>. It checks the condition and if it is false, returns Choice2Of2 with the specified error value. If the condition is true then it returns Choice1Of2 (). Loosely inspired by Swift 2.0's guard keyword.

    2 people like this

    Posted: 4 years ago by Anton Tcholakov

  • Mailbox processor that won't die on errors

    Sometimes mailboxprocessor may corrupt on errors and the state is not clear. Sometimes you don't care about the existing queue, but you want to have always a processor listening.

    1 people like this

    Posted: 12 months ago by Tuomas Hietanen