ignore strange errors from systeminformation under aarch64 (#3349)

by excluding them from global error handling, see discussions in
https://github.com/MagicMirrorOrg/MagicMirror/pull/3337
This commit is contained in:
Karsten Hassel 2024-01-14 09:13:01 +01:00 committed by GitHub
parent dadc7ba0a2
commit f890f14df7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -11,7 +11,7 @@ _This release is scheduled to be released on 2024-04-01._
### Added ### Added
- Output of system information to the console for troubleshooting (#3328 and #3337) - Output of system information to the console for troubleshooting (#3328 and #3337), ignore errors under aarch64
### Updated ### Updated

View File

@ -40,10 +40,13 @@ if (process.env.MM_PORT) {
// The next part is here to prevent a major exception when there // The next part is here to prevent a major exception when there
// is no internet connection. This could probable be solved better. // is no internet connection. This could probable be solved better.
process.on("uncaughtException", function (err) { process.on("uncaughtException", function (err) {
Log.error("Whoops! There was an uncaught exception..."); // ignore strange exceptions under aarch64 coming from systeminformation:
Log.error(err); if (!err.stack.includes("node_modules/systeminformation")) {
Log.error("MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?"); Log.error("Whoops! There was an uncaught exception...");
Log.error("If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues"); Log.error(err);
Log.error("MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?");
Log.error("If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues");
}
}); });
/** /**