mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-24 00:30:11 +00:00
Continue to subscribe if an exception is raised when calling onNext
This commit is contained in:
@@ -194,9 +194,16 @@ namespace Cysharp.Threading.Tasks.Linq
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
while (await e.MoveNextAsync())
|
while (await e.MoveNextAsync())
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
onNext(e.Current);
|
onNext(e.Current);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
UniTaskScheduler.PublishUnobservedTaskException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
onCompleted();
|
onCompleted();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -226,9 +233,16 @@ namespace Cysharp.Threading.Tasks.Linq
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
while (await e.MoveNextAsync())
|
while (await e.MoveNextAsync())
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
onNext(e.Current).Forget();
|
onNext(e.Current).Forget();
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
UniTaskScheduler.PublishUnobservedTaskException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
onCompleted();
|
onCompleted();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -258,9 +272,16 @@ namespace Cysharp.Threading.Tasks.Linq
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
while (await e.MoveNextAsync())
|
while (await e.MoveNextAsync())
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
onNext(e.Current, cancellationToken).Forget();
|
onNext(e.Current, cancellationToken).Forget();
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
UniTaskScheduler.PublishUnobservedTaskException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
onCompleted();
|
onCompleted();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -290,9 +311,16 @@ namespace Cysharp.Threading.Tasks.Linq
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
while (await e.MoveNextAsync())
|
while (await e.MoveNextAsync())
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
observer.OnNext(e.Current);
|
observer.OnNext(e.Current);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
UniTaskScheduler.PublishUnobservedTaskException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
observer.OnCompleted();
|
observer.OnCompleted();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user