opt: enable debug stacktrace output & add json serde check

This commit is contained in:
Kingtous
2022-12-09 10:49:47 +08:00
parent d5a93adbf0
commit d3d4c7dac4
7 changed files with 22 additions and 20 deletions

View File

@@ -126,7 +126,7 @@ class PlatformFFI {
// no need to set home dir
}
} catch (e) {
debugPrint('initialize failed: $e');
debugPrintStack(label: 'initialize failed: $e');
}
String id = 'NA';
String name = 'Flutter';
@@ -151,9 +151,8 @@ class PlatformFFI {
WindowsDeviceInfo winInfo = await deviceInfo.windowsInfo;
name = winInfo.computerName;
id = winInfo.computerName;
} catch (e, stacktrace) {
debugPrint("get windows device info failed: $e");
debugPrintStack(stackTrace: stacktrace);
} catch (e) {
debugPrintStack(label: "get windows device info failed: $e");
name = "unknown";
id = "unknown";
}
@@ -174,7 +173,7 @@ class PlatformFFI {
await _ffiBind.mainSetHomeDir(home: _homeDir);
await _ffiBind.mainInit(appDir: _dir);
} catch (e) {
debugPrint('initialize failed: $e');
debugPrintStack(label: 'initialize failed: $e');
}
version = await getVersion();
}