mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 02:19:08 +02:00
v1.1.2
- Removes default error catching from ArcaneLoggingService Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
This commit is contained in:
@@ -1,3 +1,33 @@
|
|||||||
|
## 1.1.2
|
||||||
|
|
||||||
|
- Removed Flutter exception handling from `ArcaneLoggingService`, as this functionality should be defined by a users' interface.
|
||||||
|
|
||||||
|
### Migration
|
||||||
|
|
||||||
|
Add the following to your `ArcaneLoggingInterface`'s `init` method to replicate the previous behavior:
|
||||||
|
|
||||||
|
```dart
|
||||||
|
// Handles unhandled Flutter errors by logging them.
|
||||||
|
FlutterError.onError = (errorDetails) {
|
||||||
|
Arcane.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) {
|
||||||
|
Arcane.log(
|
||||||
|
"$error",
|
||||||
|
level: Level.error,
|
||||||
|
stackTrace: stack,
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
## 1.1.1+2
|
## 1.1.1+2
|
||||||
|
|
||||||
- Updated example in README
|
- Updated example in README
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import "dart:async";
|
import "dart:async";
|
||||||
|
|
||||||
import "package:arcane_helper_utils/arcane_helper_utils.dart";
|
import "package:arcane_helper_utils/arcane_helper_utils.dart";
|
||||||
import "package:flutter/foundation.dart";
|
|
||||||
|
|
||||||
part "logging_enums.dart";
|
part "logging_enums.dart";
|
||||||
part "logging_interface.dart";
|
part "logging_interface.dart";
|
||||||
@@ -43,26 +42,6 @@ class ArcaneLogger {
|
|||||||
Future<void> _init() async {
|
Future<void> _init() async {
|
||||||
additionalMetadata.clear();
|
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;
|
I._initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name: arcane_framework
|
name: arcane_framework
|
||||||
description: "Agnostic Reusable Component Architecture for New Ecosystems: a modern framework for bootstrapping new applications"
|
description: "Agnostic Reusable Component Architecture for New Ecosystems: a modern framework for bootstrapping new applications"
|
||||||
version: 1.1.1+2
|
version: 1.1.2
|
||||||
repository: https://github.com/hanskokx/arcane_framework
|
repository: https://github.com/hanskokx/arcane_framework
|
||||||
issue_tracker: https://github.com/hanskokx/arcane_framework/issues
|
issue_tracker: https://github.com/hanskokx/arcane_framework/issues
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user