Skip to content

Commit 45e6925

Browse files
Fail the marathon task on any exception thrown, instead of silently swallowing them
1 parent 4928b65 commit 45e6925

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/src/main/kotlin/com/malinskiy/marathon/Marathon.kt

+2-3
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,10 @@ class Marathon(
175175
try {
176176
scheduler.stopAndWaitForCompletion()
177177
onFinish(analytics, deviceProvider, attachmentManager)
178-
} catch (up: ReportGenerationException) {
179-
// We don't want to catch this. This should fail the execution
180-
throw up
181178
} catch (throwable: Throwable) {
179+
// We don't want to catch these. If an exception was thrown, we should fail the execution
182180
log.error("Error occurred while finishing tests run", throwable)
181+
throw throwable
183182
} finally {
184183
hook.uninstall()
185184

0 commit comments

Comments
 (0)