-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
catch throwable to suppress errors in Java #1812
Conversation
71ef9a4
to
cba55a2
Compare
Codecov Report
@@ Coverage Diff @@
## main #1812 +/- ##
=========================================
Coverage 75.72% 75.72%
Complexity 2194 2194
=========================================
Files 218 218
Lines 7806 7806
Branches 828 828
=========================================
Hits 5911 5911
Misses 1493 1493
Partials 402 402
Continue to review full report at Codecov.
|
I don't see how this could hurt anything server side related. Looks good to me. |
Missing specific catch blocks that don't use Missing changes on Kotlin projects. the PR description states that logging isn't the focus but resolves the issue #1806 Tests are not adjusted to using a |
I wouldn't go that far. When we picked a specific exception type, the intent was to handle only that one. That implies already that any other type was supposed to bubble up so for that reason I wouldn't change those.
Fair point. I'll remove the
I'm not sure what we can test in this case. The intent of the code I changed was to suppress any unhandled error. It was done on the "wrong" exception type. I wrote many of those and as a C# dev I just wrote what I knew and missed the point |
Discussed on a call with @marandaneto and agreed to merge this not as resolving the inital issue but partially addressing it. |
The goal is to change code locations we suppress error to avoid the SDK bubbling errors to customers.
Firs try: I changed every match of
catch (Exception
tocatch (Throwable
. Not matching Kotlin code though, the main focus was to help avoid the case we had when debugging a crash on Unity with the Android SDK so mainlysentry-java
andsentry-android-core
.Adding additional logging isn't in the scope of this PR. When it was simple I just added a debug log, but if no logger available, I added a TODO and we can have a follow up PR.
@maciejwalkowiak does this make sense on the Spring and other backend packages or should I revert?
Partially addresses #1806 (not doing the Kotlin code)