From eddc7d07eff8a54fc9d379698860c5717a6c5708 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 5 Feb 2024 04:33:23 -0500 Subject: [PATCH] Silent fail (#350) * added throw to failed screenshot tests * added description with throw --------- Co-authored-by: Nick Rotonda --- shot-android/src/main/java/com/karumi/shot/ScreenshotTest.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shot-android/src/main/java/com/karumi/shot/ScreenshotTest.kt b/shot-android/src/main/java/com/karumi/shot/ScreenshotTest.kt index 7ca85241..b7ad58e1 100644 --- a/shot-android/src/main/java/com/karumi/shot/ScreenshotTest.kt +++ b/shot-android/src/main/java/com/karumi/shot/ScreenshotTest.kt @@ -190,6 +190,7 @@ interface ScreenshotTest { .record() } catch (t: Throwable) { Log.e("Shot", "Exception captured while taking screenshot for snapshot with name $snapshotName", t) + throw IllegalStateException("Exception occurred while taking screenshot for snapshot with name $snapshotName", t) } } @@ -204,6 +205,7 @@ interface ScreenshotTest { .record() } catch (t: Throwable) { Log.e("Shot", "Exception captured while taking screenshot for snapshot with name $snapshotName", t) + throw IllegalStateException("Exception occurred while taking screenshot for snapshot with name $snapshotName", t) } }