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

Nested exception support #158

Merged
merged 15 commits into from
Nov 27, 2024
Merged

Nested exception support #158

merged 15 commits into from
Nov 27, 2024

Conversation

konraddysput
Copy link
Collaborator

Why

This pull request captures nested exception via UncaughtExceptionHandler. In the past, the SDK allowed only capturing a single exception, even if the exception had a cause. This pull request converts an exception chain into a report array with additional attribute identifiers, so the user can see the whole nested exception history.

Example:

 public void unhandledException(View view) throws IOException {
        try {
            getSaveData();
        } catch (IOException exception) {
            this.throwOriginalExceptionAsInnerException(exception);
        }
    }

    private void throwOriginalExceptionAsInnerException(Exception exception) throws IOException {
        throw new IOException("test", exception);
    }

ref: BT-5223

@konraddysput konraddysput added the enhancement New feature or request label Nov 19, 2024
@konraddysput konraddysput self-assigned this Nov 19, 2024
Copy link
Contributor

@melekr melekr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@BartoszLitwiniuk
Copy link
Collaborator

Are you sure that we should mix changing exception to throwable with adding new feature?

@BartoszLitwiniuk
Copy link
Collaborator

lgtm! Good job @konraddysput

@konraddysput konraddysput enabled auto-merge (squash) November 27, 2024 12:42
@konraddysput konraddysput merged commit 43d645b into master Nov 27, 2024
3 checks passed
@konraddysput konraddysput deleted the improvement/nested-exception branch November 27, 2024 12:45
@konraddysput konraddysput mentioned this pull request Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants