extensionSystem: Improve error formatting
This exposes the formatted error with stack trace and proper location of SyntaxErrors over the bus, instead of just the message. <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041> Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>
This commit is contained in:

committed by
Florian Müllner

parent
1692004b6b
commit
71befc5ff7
@ -9,6 +9,7 @@ import * as Signals from '../misc/signals.js';
|
||||
|
||||
import * as Config from '../misc/config.js';
|
||||
import * as ExtensionDownloader from './extensionDownloader.js';
|
||||
import {formatError} from '../misc/errorUtils.js';
|
||||
import {ExtensionState, ExtensionType} from '../misc/extensionUtils.js';
|
||||
import * as FileUtils from '../misc/fileUtils.js';
|
||||
import * as Main from './main.js';
|
||||
@ -359,8 +360,7 @@ export class ExtensionManager extends Signals.EventEmitter {
|
||||
if (!extension)
|
||||
return;
|
||||
|
||||
const message = error instanceof Error
|
||||
? error.message : error.toString();
|
||||
const message = formatError(error, {showStack: false});
|
||||
|
||||
console.debug(`Changing state of extension ${uuid} to ERROR`);
|
||||
extension.error = message;
|
||||
|
Reference in New Issue
Block a user