Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Error Handling and Stacktraces When Unsubscribe Fails #730

Merged

Conversation

benjchristensen
Copy link
Member

The stacktraces were a mess when onError failed or was not implemented and unsubscribe also failed.
That is a far edge case and means code is broken and breaking the Rx contracts … but that’s just when we need clear stacktraces.
The CompositeException and SafeObserver class now do a dance and wire together a causal chain to provide a stacktrace that can identity all the points of error.
Also standardized and simplified the RxJavaPlugin.onErrorHandler while working in the vicinity.

This came about after I was asked to help debug a problem and couldn’t do it by looking at the thrown exception, I had to use a debugger and step through.

The stacktraces were a mess when onError failed or was not implemented and unsubscribe also failed.
That is a far edge case and means code is broken and breaking the Rx contracts … but that’s just when we need clear stacktraces.
The CompositeException and SafeObserver class now do a dance and wire together a causal chain to provide a stacktrace that can identity all the points of error.
Also standardized and simplified the RxJavaPlugin.onErrorHandler while working in the vicinity.

This came about after I was asked to help debug a problem and couldn’t do it by looking at the thrown exception, I had to use a debugger and step through.
@cloudbees-pull-request-builder

RxJava-pull-requests #644 SUCCESS
This pull request looks good

benjchristensen added a commit that referenced this pull request Jan 9, 2014
Improve Error Handling and Stacktraces When Unsubscribe Fails
@benjchristensen benjchristensen merged commit 0b1b6e7 into ReactiveX:master Jan 9, 2014
@benjchristensen benjchristensen deleted the unsubscribe-error-handling branch January 9, 2014 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants