Error and catching updates
Pre-release
Pre-release
Based on this discussion the Error
type has had a few changes:
- The bespoke
Equals
operators have been removed. Meaning that allError
types use the built-in record structural equality. Is<E>() where E : Exception
, the test for an exceptional error contained within theError
, has been renamed toHasException<E>()
.IsType<E>() where E : Error
has been added to test ifthis
contains anE
. It's likethis is E
, but becausethis
might contain many-errors, it checks for the existence of anyError
of typeE
.
The Catch
extensions and the @catch
combinators have been updated:
- To fix some obvious bugs!
- To flip the operands when matching, so the predicate argument is on the left-hand-side where appropriate.
- Added support for error-codes in
Catch
(previously missing)
Previous releases:
I did some minor releases that didn't get release notes, so here's a quick summary:
notFollowedBy
inParsec
reports the correct position- Explicit (
useAsync
) and implicit (viause
) support forIAsyncDisposable
resources - Some
Run
overrides forEff
weren't disposing of theEnvIO
properly Fin.Apply
matching fixLiftM
support forStreamT
:- Previously we could
Lift(IAsyncEnumerable<A>)
orLift(IEnumerable<A>)
to return aStreamT<M, A>
- Now we can
LiftM(IAsyncEnumerable<K<M, A>>)
andLiftM(IEnumerable<K<M, A>>)
to also return aStreamT<M, A>
- Previously we could