Skip to content

Commit

Permalink
Clean up report mode support checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ThexXTURBOXx committed Jan 6, 2024
1 parent 9238700 commit 487a890
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/core/catcher_2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ class Catcher2 implements ReportModeAction {
}
if (!isReportModeSupportedInPlatform(report, reportMode)) {
_logger.warning(
'$reportMode in not supported for ${report.platformType.name} platform',
'$reportMode is not supported for ${report.platformType.name} platform',
);
return;
}
Expand All @@ -557,12 +557,8 @@ class Catcher2 implements ReportModeAction {

/// Check if given report mode is enabled in current platform. Only supported
/// handlers in given report mode can be used.
bool isReportModeSupportedInPlatform(Report report, ReportMode reportMode) {
if (reportMode.getSupportedPlatforms().isEmpty) {
return false;
}
return reportMode.getSupportedPlatforms().contains(report.platformType);
}
bool isReportModeSupportedInPlatform(Report report, ReportMode reportMode) =>
reportMode.getSupportedPlatforms().contains(report.platformType);

ReportMode? _getReportModeFromExplicitExceptionReportModeMap(error) {
final errorName = error != null ? error.toString().toLowerCase() : '';
Expand Down

0 comments on commit 487a890

Please sign in to comment.