question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make FsToolkit.ErrorHandling a superset of Cvdm.ErrorHandling?

See original GitHub issue

This library looks great! Good documentation and more comprehensive than Cvdm.ErrorHandling with regards to operators and choice of CEs (asyncResultOption).

Currently Cvdm.ErrorHandling has certain important features I don’t immediately see in FsToolkit.ErrorHandling (having read the docs, not tested or browsed the code to any significant degree). I think I’d like for FsToolkit.ErrorHandling to be a superset of Cvdm.ErrorHandling and then simply retire the latter. The goals seem similar enough that I think this could be feasible, and it would benefit users by removing an unnecessary choice. How do you feel about that? Specifically:

  • Cvdm.ErrorHandling contains overloads on the asyncResult CE builder so that it can bind/return Result<_,_> expressions, not just Async<Result<_,_>>. This is a must for me as I use Result<_,_> and Async<Result<_,_>> expressions interchangeably all the time (in the same CEs), and I won’t move to another error handling library that doesn’t have this. Not sure how the overload trick will work with AsyncResultOption though, since it has three wrappers instead of two. Might work fine, might not work. Still, supporting this in AsyncResult is better than none.

  • Cvdm.ErrorHandling contains more members on the CE builders. Not sure from the top of my head what the practical differences are, but running relevant unit tests in Cvdm.ErrorHandling against FsToolkit.ErrorHandling should surface any missing features and incongruities in behaviour.

  • Cvdm.ErrorHandling contains quite a few helpers in the Result and AsyncResult modules (e.g. requireSome, requireTrue, requireEqual) to make it syntactically simpler to do ad-hoc validation in CEs when separate functions aren’t really needed. See the readme for a couple of examples.

  • Cvdm.ErrorHandling is AutoOpened. For the rationale behind this, see https://github.com/cmeeren/Cvdm.ErrorHandling/pull/1.

Thoughts?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
cmeerencommented, Feb 7, 2019

Sounds good, thanks šŸ‘

1reaction
demystifyfpcommented, Jan 27, 2019

Hi @cmeeren, All the helper functions from Cvdm.ErrorHandling is now part of FsToolkit.ErrorHandling version 0.0.14.

Will be working on CE next!

Read more comments on GitHub >

github_iconTop Results From Across the Web

FsToolkit.ErrorHandling: README
FsToolkit.ErrorHandling is a utility library to work with the Result type in F#, and allows you to do clear, simple and powerful error...
Read more >
Introducing FsToolkit.ErrorHandling : r/fsharp
ErrorHandling is a utility library to work with Result type in F# to do error handling. It was inspired by the Chessie and...
Read more >
what is 'and!' in the validation computation expression with ...
I've just started dabbling in computation expressions and things are starting to make sense, although I don't really understand why we haveĀ ...
Read more >
FsToolkit.Errorhandling 2.0 - Jimmy Byrd
I'm happy to announce FsToolkit.ErrorHandling 2.0. I'll go over some of the major changes that this release has brought.
Read more >
F# Error Handling with 'Result'
Here we'll use the AsyncResult module from FsToolkit.ErrorHandling which allows us to drop the async computation expression:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found