You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't seem that try catches exceptions. Repro (using xUnit and Unquote):
/// Helper type for simulating side effects.typeTrigger()=let mutableisTriggered=falsemember__.Trigger()= isTriggered <-truemember__.Triggered= isTriggered
[<Fact>]let``behavior of try-with-finallywhen thrown`` ()=lettTry= Trigger()lettCatch= Trigger()lettFinally= Trigger()letresult= monad {trytry
failwith ""
tTry.Trigger()with_-> tCatch.Trigger()finally tFinally.Trigger()}
test <@ result = Ok ()@>
test <@not tTry.Triggered @>
test <@ tCatch.Triggered @>
test <@ tFinally.Triggered @>
None of the unquote tests are checked, because the exception is not caught, but they do describe what should happen if the exception is caught.
The text was updated successfully, but these errors were encountered:
Obviously the reason is again because Result is not really lazy, using a strict workflow is the right thing.
Now this is another indication that mixing workflows (and autosensing them) is not that great.
We should definitely think about it, if we revert this decision we can release a new major version of the library, or we can deprecate existing workflows and create new one, which wouldn't require a new major release.
It doesn't seem that
try
catches exceptions. Repro (using xUnit and Unquote):None of the unquote tests are checked, because the exception is not caught, but they do describe what should happen if the exception is caught.
The text was updated successfully, but these errors were encountered: