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

Fix crash when throwable cause is already initialized #9

Closed
wants to merge 1 commit into from

Conversation

jonnyandrew
Copy link

Issue

When trying to append a TraceurException to a throwable which has already had it's cause initialised, an exception is thrown.
See #7

Resolution

In this case, theres not much we can do to resolve the issue because Throwable#initCause is not designed to be called twice. So the fix in this PR uses the same logic as the RxJava2Extensions project by catching any exception and continuing.
See https://github.com/akarnokd/RxJava2Extensions/blob/2ec72c9a317da02717d207f876ca5ba43768d802/src/main/java/hu/akarnokd/rxjava2/debug/RxJavaAssemblyException.java#L129

@jonnyandrew jonnyandrew closed this Feb 6, 2020
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.

1 participant