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

Handle uncaught exceptions from async calls #1653

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

swankjesse
Copy link
Collaborator

When the guest throws an uncaught exception, a guest-side CoroutineExceptionHandler now forwards it to the host via AppLifecycle.handleUncaughtException(). That now triggers a graceful break of all UIs.

@swankjesse
Copy link
Collaborator Author

async_crash.mp4

* When a Treehouse app fails its current [Zipline] instance is canceled so no further code will
* execute. A new [Zipline] will start when new code available, or when the app is restarted.
*/
public open fun uncaughtException(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For follow-up, I’d like more Zipline-specific context here. The ZiplineManifest has the release version, and that’ll be super valuable for reporting upstream.

@swankjesse
Copy link
Collaborator Author

Part of #1458

@swankjesse
Copy link
Collaborator Author

⚠️ stacked PR!

@swankjesse swankjesse force-pushed the jwilson.1028.uncaught_exceptions branch from 54e0a63 to 3c6ff73 Compare November 1, 2023 02:12
Base automatically changed from jwilson.1028.uncaught_exceptions to trunk November 1, 2023 02:32
squarejesse and others added 3 commits October 31, 2023 22:37
When the guest throws an uncaught exception, a guest-side
CoroutineExceptionHandler now forwards it to the host via
AppLifecycle.handleUncaughtException(). That now triggers
a graceful break of all UIs.
@swankjesse swankjesse force-pushed the jwilson.1030.uncaught_exceptions_async branch from eb89498 to 603b8ce Compare November 1, 2023 02:38
@swankjesse swankjesse enabled auto-merge (squash) November 1, 2023 02:42
@swankjesse swankjesse merged commit 44da985 into trunk Nov 1, 2023
8 checks passed
@swankjesse swankjesse deleted the jwilson.1030.uncaught_exceptions_async branch November 1, 2023 03:42
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.

3 participants