Skip to content

Commit

Permalink
feat: Added logUnhandledError to ImpaktfullCrashReportingUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
vanlooverenkoen committed Feb 20, 2025
1 parent 1833af7 commit 56ae12c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.13.0

## BREAKING

- Added logUnhandledError to ImpaktfullCrashReportingUtil

# 0.12.0

## Feat
Expand Down
4 changes: 3 additions & 1 deletion lib/src/util/crash_reporting/crash_reporting_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ abstract class ImpaktfullCrashReportingUtil {

void setUserProperty(String property, String value);

void log(String message, {Map<String, dynamic>? data});

void logError({
required Object error,
required StackTrace stackTrace,
String? message,
});

void log(String message, {Map<String, dynamic>? data});
void logUnhandledError(Object error, StackTrace stackTrace);
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,11 @@ class MultiInstanceCrashReportingUtil extends ImpaktfullCrashReportingUtil {
util.logError(error: error, stackTrace: stackTrace, message: message);
}
}

@override
void logUnhandledError(Object error, StackTrace stackTrace) {
for (final util in crashReportingUtils) {
util.logUnhandledError(error, stackTrace);
}
}
}

0 comments on commit 56ae12c

Please sign in to comment.