mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
extensionSystem: Catch import errors
While we catch errors that occur when calling init(), enable() or disable(), the import itself can throw an exception, for instance if the extension imports an unavailable typelib or tries to draw in a conflicting library. https://bugzilla.gnome.org/show_bug.cgi?id=781728
This commit is contained in:
parent
88b1a5d3a0
commit
d461d02cdc
1 changed files with 6 additions and 1 deletions
|
|
@ -225,7 +225,12 @@ function initExtension(uuid) {
|
|||
let extensionState = null;
|
||||
|
||||
ExtensionUtils.installImporter(extension);
|
||||
extensionModule = extension.imports.extension;
|
||||
try {
|
||||
extensionModule = extension.imports.extension;
|
||||
} catch(e) {
|
||||
logExtensionError(uuid, e);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (extensionModule.init) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue