diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js index 06020774..23456745 100644 --- a/extensions/apps-menu/extension.js +++ b/extensions/apps-menu/extension.js @@ -326,7 +326,7 @@ class DesktopTarget { (o, res) => { try { o.set_attributes_finish(res); - } catch(e) { + } catch (e) { log('Failed to update access time: ' + e.message); } }); @@ -353,7 +353,7 @@ class DesktopTarget { // Hack: force nautilus to reload file info this._touchFile(file); }); - } catch(e) { + } catch (e) { log('Failed to mark file as trusted: ' + e.message); } }); @@ -391,7 +391,7 @@ class DesktopTarget { // copy_async() isn't introspectable :-( src.copy(dst, Gio.FileCopyFlags.OVERWRITE, null, null); this._markTrusted(dst); - } catch(e) { + } catch (e) { log('Failed to copy to desktop: ' + e.message); } @@ -563,7 +563,7 @@ class ApplicationsButton extends PanelMenu.Button { let id; try { id = entry.get_desktop_file_id(); // catch non-UTF8 filenames - } catch(e) { + } catch (e) { continue; } let app = appSys.lookup_app(id); diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js index 56141a71..918d2981 100644 --- a/extensions/drive-menu/extension.js +++ b/extensions/drive-menu/extension.js @@ -84,7 +84,7 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem { _unmountFinish(mount, result) { try { mount.unmount_with_operation_finish(result); - } catch(e) { + } catch (e) { this._reportFailure(e); } } @@ -92,7 +92,7 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem { _ejectFinish(mount, result) { try { mount.eject_with_operation_finish(result); - } catch(e) { + } catch (e) { this._reportFailure(e); } } diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js index b57ead49..9f36d307 100644 --- a/extensions/places-menu/placeDisplay.js +++ b/extensions/places-menu/placeDisplay.js @@ -45,7 +45,7 @@ class PlaceInfo { return (_ignored, result) => { try { Gio.AppInfo.launch_default_for_uri_finish(result); - } catch(e) { + } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_MOUNTED)) { let source = { get_icon: () => { return this.icon; } @@ -55,7 +55,7 @@ class PlaceInfo { try { op.close(); file.mount_enclosing_volume_finish(result); - } catch(e) { + } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED)) // e.g. user canceled the password dialog return; @@ -94,7 +94,7 @@ class PlaceInfo { let info = file.query_info_finish(result); this.icon = info.get_symbolic_icon(); this.emit('changed'); - } catch(e) { + } catch (e) { if (e instanceof Gio.IOErrorEnum) return; throw e; @@ -122,7 +122,7 @@ class PlaceInfo { try { let info = this.file.query_info('standard::display-name', 0, null); return info.get_display_name(); - } catch(e) { + } catch (e) { if (e instanceof Gio.IOErrorEnum) return this.file.get_basename(); throw e; @@ -203,7 +203,7 @@ class PlaceDeviceInfo extends PlaceInfo { _ejectFinish(mount, result) { try { mount.eject_with_operation_finish(result); - } catch(e) { + } catch (e) { this._reportFailure(e); } } @@ -211,7 +211,7 @@ class PlaceDeviceInfo extends PlaceInfo { _unmountFinish(mount, result) { try { mount.unmount_with_operation_finish(result); - } catch(e) { + } catch (e) { this._reportFailure(e); } } @@ -350,7 +350,7 @@ var PlacesManager = class { let file = Gio.File.new_for_path(specialPath), info; try { info = new PlaceInfo('special', file); - } catch(e) { + } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) continue; throw e; @@ -517,7 +517,7 @@ var PlacesManager = class { try { devItem = new PlaceDeviceInfo(kind, mount); - } catch(e) { + } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) return; throw e; @@ -531,7 +531,7 @@ var PlacesManager = class { try { volItem = new PlaceVolumeInfo(kind, volume); - } catch(e) { + } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) return; throw e;