extensionSystem: Use logError to record extension errors with stack trace

Extensions might emit JS errors explicitly or implicitly, however GNOME
Shell doesn't present any stack trace for those making them quite hard
to debug.

Make this easier by logging errors with logError() whichs includes the
stack dump.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
This commit is contained in:
Marco Trevisan (Treviño) 2019-09-02 14:01:36 +02:00 committed by Florian Müllner
parent a497afe695
commit 8a7e44ccf0

View File

@ -194,7 +194,7 @@ var ExtensionManager = class {
extension.errors = [];
extension.errors.push(message);
log('Extension "%s" had error: %s'.format(uuid, message));
logError(error, `Extension ${uuid}`);
this.emit('extension-state-changed', extension);
}