HummErrorHandler class

Constructors

HummErrorHandler.new()
factory

Properties

errorStorage HummErrorStorage
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
logSize int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addTracker(HummErrorTracker tracker) → void
createZoneSpecification() ZoneSpecification
Configure a Zone for handling uncaught asynchronous errors
handleError(dynamic error, StackTrace stackTrace, {String? source, Map<String, dynamic>? additionalData, bool displayToUser = true}) Future<void>
init({String? storageKey, HummErrorStorage? errorStorage, List<HummErrorTracker>? trackers, int? logSize, ErrorDisplayCallback? errorDisplayCallback, ErrorTranslationCallback? errorTranslationCallback, bool shouldDisplayErrorCallback(dynamic error, StackTrace stackTrace)?, String? defaultErrorMessage}) Future<void>
Initialize the error handler with basic configuration
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDefaultErrorMessage(String message) → void
Set or update the default error message
setErrorDisplayCallback(ErrorDisplayCallback callback) → void
Set or update the callback for displaying errors to users
setErrorTranslationCallback(ErrorTranslationCallback callback) → void
Set or update the callback for translating errors
setShouldDisplayErrorCallback(bool callback(dynamic error, StackTrace stackTrace)) → void
Set the callback that determines if an error should be displayed
setupFlutterErrorHandling() → void
Set up standard error handling for Flutter
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

runAppWithErrorHandling(Widget app, {List<NavigatorObserver>? navigatorObservers}) → void
Run the app in a Zone that catches errors. This is a simpler version of setupErrorHandling that doesn't create a new zone if we're already in one.
setup({List<HummErrorTracker>? trackers, String? storageKey, HummErrorStorage? errorStorage, ErrorDisplayCallback? errorDisplayCallback, ErrorTranslationCallback? errorTranslationCallback, bool shouldDisplayErrorCallback(dynamic error, StackTrace stackTrace)?, String? defaultErrorMessage, int? logSize}) Future<void>