From 7728498bf90e289d7ab2bbc830dc20955e3cb6f5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 9 Feb 2026 17:01:00 +0100 Subject: [PATCH] simplified error handler --- lib/error_handler.dart | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/error_handler.dart b/lib/error_handler.dart index 8015dd4..2b59b4c 100644 --- a/lib/error_handler.dart +++ b/lib/error_handler.dart @@ -24,21 +24,7 @@ class ErrorHandler { onError?.call(error, stackTrace); } - /// Convenience method to wrap code that might throw exceptions - T handleError(T Function() operation, {T? defaultValue}) { - try { - return operation(); - } catch (error, stackTrace) { - notify(error, stackTrace); - - if (defaultValue != null) { - return defaultValue; - } - - rethrow; - } - } } /// Global instance of ErrorHandler for easy access -final ErrorHandler errorHandler = ErrorHandler(); \ No newline at end of file +final ErrorHandler errorHandler = ErrorHandler();