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

Improve exception handling #54

Merged
merged 2 commits into from
Dec 18, 2023
Merged

Conversation

paulmihaicraciunas
Copy link

Added custom exceptions for failures in report generation and screenshot pulling and integrated them

@@ -174,14 +175,17 @@ class Marathon(
try {
scheduler.stopAndWaitForCompletion()
onFinish(analytics, deviceProvider, attachmentManager)
} catch (up: ReportGenerationException) {
// We don't want to catch this. This should fail the execution
throw up

Choose a reason for hiding this comment

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

Have you considered doing the same for all Throwables?

Copy link
Author

Choose a reason for hiding this comment

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

I couldn't test many other exceptions so I'm not sure how often this will happen.
I updated it so that now, we do the same for all throwables, but we need to monitor the results carefully, in case something unexpected breaks

@paulmihaicraciunas paulmihaicraciunas merged commit e07de46 into develop Dec 18, 2023
2 checks passed
@technoir42 technoir42 deleted the improve_exception_handling branch June 21, 2024 11:25
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.

2 participants