- Removes default error catching from ArcaneLoggingService

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
This commit is contained in:
Hans Kokx
2024-10-18 16:37:10 +02:00
parent a04a8b1f2a
commit a29da7c090
3 changed files with 31 additions and 22 deletions
@@ -1,7 +1,6 @@
import "dart:async";
import "package:arcane_helper_utils/arcane_helper_utils.dart";
import "package:flutter/foundation.dart";
part "logging_enums.dart";
part "logging_interface.dart";
@@ -43,26 +42,6 @@ class ArcaneLogger {
Future<void> _init() async {
additionalMetadata.clear();
// Handles unhandled Flutter errors by logging them.
FlutterError.onError = (errorDetails) {
log(
errorDetails.exceptionAsString(),
level: Level.error,
module: errorDetails.library,
stackTrace: errorDetails.stack,
);
};
// Handles unhandled platform-specific errors by logging them.
PlatformDispatcher.instance.onError = (error, stack) {
log(
"$error",
level: Level.error,
stackTrace: stack,
);
return false;
};
I._initialized = true;
}