JavascriptException error when IAsyncEnumerable/IObservable initial exception
LINQPad v7.4.9, following code:
void Main() { GetIds().Dump(); } async IAsyncEnumerable<int> GetIds() { throw new Exception("Error"); for (int i = 0; i < 5; ++i) { yield return i; await Task.Delay(100); } }
Hit F5, will popup following error:
Non-initial exception will be good:
void Main() { GetIds().Dump(); } async IAsyncEnumerable<int> GetIds() { for (int i = 0; i < 5; ++i) { yield return i; await Task.Delay(100); if (i == 3) throw new Exception("Error"); } }
Comments
@JoeAlbahari can you take a look on this one?
This should have been fixed in latest beta - let me know if it’s still an issue.