Open rugbbyli opened 4 years ago
example:
private IEnumerator Work1() { yield return null; yield return Work2(); } private IEnumerator Work2() { yield return null; throw new Exception(); } void Test() { Debug.LogError("test begin."); Observable.FromCoroutine(Work1).Subscribe( _ => { }, err => { Debug.LogError("work1 error!"); }, () => {Debug.LogError("work1 complete!");} ); Observable.FromCoroutine(Work2).Subscribe( _ => { }, err => { Debug.LogError("work2 error!"); }, () => {Debug.LogError("work2 complete!");} ); }
when invoke Test(), the output would be:
test begin. work2 error! Exception: Exception of type 'System.Exception' was thrown.
the expected output should be:
test begin. work2 error! work1 error!
example:
when invoke Test(), the output would be:
the expected output should be: