Skip to content

Commit

Permalink
Merge pull request neuecc#312 from sheepbeo/fix/ContinueWithException…
Browse files Browse the repository at this point in the history
…Handling

Add try catch block to handle exception when finishing ContinueWith
  • Loading branch information
neuecc authored Jul 16, 2018
2 parents bcaa1df + a036b72 commit 282c0dd
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Operators/ContinueWith.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,20 @@ public override void OnCompleted()
{
if (seenValue)
{
var v = parent.selector(lastValue);
// dispose source subscription
serialDisposable.Disposable = v.Subscribe(observer);
try
{
var v = parent.selector(lastValue);
// dispose source subscription
serialDisposable.Disposable = v.Subscribe(observer);
}
catch (Exception error)
{
OnError(error);
}
finally
{
Dispose();
}
}
else
{
Expand Down

0 comments on commit 282c0dd

Please sign in to comment.