We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51db6c7 commit 374c7b8Copy full SHA for 374c7b8
1 file changed
lib/utilities/logger.dart
@@ -11,6 +11,7 @@
11
import 'dart:convert';
12
import 'dart:core' as core;
13
import 'dart:core';
14
+import 'dart:io';
15
import 'dart:isolate';
16
import 'dart:ui';
17
@@ -150,8 +151,16 @@ class Logging {
150
151
),
152
toFile,
153
));
- } catch (e, s) {
154
- t("Isolates suck", error: e, stackTrace: s);
+ } catch (dispatchError, dispatchStackTrace) {
155
+ final originalMessage = _stringifyMessage(message);
156
+ final fallbackLines = <String>[
157
+ "[logging-fallback:$level] $originalMessage",
158
+ "dispatchError: $dispatchError",
159
+ if (error != null) "error: $error",
160
+ if (stackTrace != null) "stackTrace: $stackTrace",
161
+ "dispatchStackTrace: $dispatchStackTrace",
162
+ ];
163
+ stderr.writeln(fallbackLines.join("\n"));
164
}
165
166
0 commit comments