Skip to content

Commit

Permalink
Fail the marathon task on any exception thrown, instead of silently s…
Browse files Browse the repository at this point in the history
…wallowing them
  • Loading branch information
paulmihaicraciunas committed Dec 18, 2023
1 parent 4928b65 commit 45e6925
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/main/kotlin/com/malinskiy/marathon/Marathon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,10 @@ 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
} catch (throwable: Throwable) {
// We don't want to catch these. If an exception was thrown, we should fail the execution
log.error("Error occurred while finishing tests run", throwable)
throw throwable
} finally {
hook.uninstall()

Expand Down

0 comments on commit 45e6925

Please sign in to comment.