mirror of https://github.com/Cysharp/UniTask
Continue to subscribe if an exception is raised when calling onNext
parent
7718d345c8
commit
f1813a7c94
|
@ -195,7 +195,14 @@ namespace Cysharp.Threading.Tasks.Linq
|
||||||
{
|
{
|
||||||
while (await e.MoveNextAsync())
|
while (await e.MoveNextAsync())
|
||||||
{
|
{
|
||||||
onNext(e.Current);
|
try
|
||||||
|
{
|
||||||
|
onNext(e.Current);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
UniTaskScheduler.PublishUnobservedTaskException(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onCompleted();
|
onCompleted();
|
||||||
}
|
}
|
||||||
|
@ -227,7 +234,14 @@ namespace Cysharp.Threading.Tasks.Linq
|
||||||
{
|
{
|
||||||
while (await e.MoveNextAsync())
|
while (await e.MoveNextAsync())
|
||||||
{
|
{
|
||||||
onNext(e.Current).Forget();
|
try
|
||||||
|
{
|
||||||
|
onNext(e.Current).Forget();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
UniTaskScheduler.PublishUnobservedTaskException(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onCompleted();
|
onCompleted();
|
||||||
}
|
}
|
||||||
|
@ -259,7 +273,14 @@ namespace Cysharp.Threading.Tasks.Linq
|
||||||
{
|
{
|
||||||
while (await e.MoveNextAsync())
|
while (await e.MoveNextAsync())
|
||||||
{
|
{
|
||||||
onNext(e.Current, cancellationToken).Forget();
|
try
|
||||||
|
{
|
||||||
|
onNext(e.Current, cancellationToken).Forget();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
UniTaskScheduler.PublishUnobservedTaskException(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onCompleted();
|
onCompleted();
|
||||||
}
|
}
|
||||||
|
@ -291,7 +312,14 @@ namespace Cysharp.Threading.Tasks.Linq
|
||||||
{
|
{
|
||||||
while (await e.MoveNextAsync())
|
while (await e.MoveNextAsync())
|
||||||
{
|
{
|
||||||
observer.OnNext(e.Current);
|
try
|
||||||
|
{
|
||||||
|
observer.OnNext(e.Current);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
UniTaskScheduler.PublishUnobservedTaskException(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
observer.OnCompleted();
|
observer.OnCompleted();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue