Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.37 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.37 KB

LangExtAsyncOptFail

Sample solution showing issue with Language-Ext package and failing async operation. See issue 292 on project home.

Steps

  1. Restore packages
  2. Run from Visual Studio or command line
  3. Press a key to actually start processing

See generated exception, the one wrapped in an AggregateException due to .Wait():

Type:

LanguageExt.BottomException

Message:

Value is in a bottom state and therefore not valid. This can happen when the value was filtered and the predicate returned false and there was no valid state the value could be in. If you are going to use the type in a filter you should check if the IsBottom flag is set before use. This can also happen if the struct wasn't initialised properly and then used.

Stacktrace:

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TaskExtensions.d__5`3.MoveNext()

Workarounds

See branch fix/left-type-extensions for a possible workaround. See also changes made.