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

Implement a default uncaught exception handler #3254

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

ewpatton
Copy link
Member

@ewpatton ewpatton commented Nov 2, 2024

Change-Id: Icb5517fad7968978e2a21a4de6078d1407308829

General items:

If your code changes how something works on the device (i.e., it affects the companion):

  • I branched from ucr
  • My pull request has ucr as the base

Further, if you've changed the blocks language or another user-facing designer/blocks API (added a SimpleProperty, etc.):

  • I have updated the corresponding version number in YaVersion.java
  • I have updated the corresponding upgrader in YoungAndroidFormUpgrader.java (components only)
  • I have updated the corresponding entries in versioning.js

For all other changes:

  • I branched from master
  • My pull request has master as the base

What does this PR accomplish?

Description

Fixes #3179 by setting a custom handler for when threads throw uncaught exceptions. Note that the behavior is different between Form and ReplForm, where the latter reports errors back to the editor via RetValManager.

Change-Id: Icb5517fad7968978e2a21a4de6078d1407308829
Change-Id: I9d06b4850aaf2ed3ac135254e6d14c07e5382cec
@ewpatton
Copy link
Member Author

ewpatton commented Nov 4, 2024

@jisqyv Here is a test app with an extension that just throws an error on another thread using AsynchUtil.

ExceptionTester.aia.zip

@jisqyv jisqyv self-requested a review November 5, 2024 14:38
Copy link
Member

@jisqyv jisqyv left a comment

Choose a reason for hiding this comment

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

LGTM. I'm not sure if it will catch everything, but I believe it will catch most of the things that wind up being reported to the Play Store (and get us in trouble). I tested this by forcing exceptions like the ones I see reported to the Play Store.

@jisqyv jisqyv merged commit c7540af into mit-cml:ucr Nov 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a default uncaught exception handler for REPL
2 participants