Created
June 20, 2021 13:33
-
-
Save rdelrosario/1238f341b6fa01744be7406d871550cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ReactiveToDoSample | |
{ | |
public class RxExceptionHandler : IObserver<Exception> | |
{ | |
public void OnNext(Exception ex) | |
{ | |
if (Debugger.IsAttached) | |
{ | |
Debugger.Break(); | |
} | |
RxApp.MainThreadScheduler.Schedule(() => { throw ex; }); | |
} | |
public void OnError(Exception ex) | |
{ | |
if (Debugger.IsAttached) | |
{ | |
Debugger.Break(); | |
} | |
RxApp.MainThreadScheduler.Schedule(() => { throw ex; }); | |
} | |
public void OnCompleted() | |
{ | |
if (Debugger.IsAttached) | |
{ | |
Debugger.Break(); | |
} | |
RxApp.MainThreadScheduler.Schedule(() => { throw new NotImplementedException(); }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment