Skip to content

Commit 175d098

Browse files
authored
ref: Minor refactoring simplifying replay quality parsing on Android (#5305)
1 parent 2225fc5 commit 175d098

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

packages/core/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -447,19 +447,15 @@ private SentryReplayQuality parseReplayQuality(@Nullable String qualityString) {
447447
return SentryReplayQuality.MEDIUM;
448448
}
449449

450-
try {
451-
switch (qualityString.toLowerCase(Locale.ROOT)) {
452-
case "low":
453-
return SentryReplayQuality.LOW;
454-
case "medium":
455-
return SentryReplayQuality.MEDIUM;
456-
case "high":
457-
return SentryReplayQuality.HIGH;
458-
default:
459-
return SentryReplayQuality.MEDIUM;
460-
}
461-
} catch (Exception e) {
462-
return SentryReplayQuality.MEDIUM;
450+
switch (qualityString.toLowerCase(Locale.ROOT)) {
451+
case "low":
452+
return SentryReplayQuality.LOW;
453+
case "medium":
454+
return SentryReplayQuality.MEDIUM;
455+
case "high":
456+
return SentryReplayQuality.HIGH;
457+
default:
458+
return SentryReplayQuality.MEDIUM;
463459
}
464460
}
465461

0 commit comments

Comments
 (0)