style: Use space after catch

We are currently inconsistent with whether or not to put a space
after catch clauses. While the predominant style is to omit it,
that's inconsistent with the style we use for any other statement.
There's not really a good reason to stick with it, so switch to
the style gjs/eslint default to.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
This commit is contained in:
Florian Müllner
2019-01-29 02:26:39 +01:00
parent d008c6c5c5
commit f250643385
26 changed files with 53 additions and 53 deletions

View File

@ -235,7 +235,7 @@ var ExtensionFinder = class {
: ExtensionType.SYSTEM;
try {
extension = createExtensionObject(uuid, extensionDir, type);
} catch(e) {
} catch (e) {
logError(e, 'Could not load extension %s'.format(uuid));
return;
}

View File

@ -62,7 +62,7 @@ var IBusManager = class {
try {
Gio.Subprocess.new(['ibus-daemon', '--xim', '--panel', 'disable'],
Gio.SubprocessFlags.NONE);
} catch(e) {
} catch (e) {
log('Failed to launch ibus-daemon: ' + e.message);
}
}
@ -138,7 +138,7 @@ var IBusManager = class {
engine = this._ibus.get_global_engine_async_finish(result);
if (!engine)
return;
} catch(e) {
} catch (e) {
return;
}
this._engineChanged(this._ibus, engine.get_name());

View File

@ -43,7 +43,7 @@ function canLock() {
let version = result.deep_unpack()[0].deep_unpack();
return haveSystemd() && versionCompare('3.5.91', version);
} catch(e) {
} catch (e) {
return false;
}
}
@ -185,7 +185,7 @@ var LoginManagerSystemd = class {
let [outVariant, fdList] = proxy.call_with_unix_fd_list_finish(result);
fd = fdList.steal_fds()[0];
callback(new Gio.UnixInputStream({ fd: fd }));
} catch(e) {
} catch (e) {
logError(e, "Error getting systemd inhibitor");
callback(null);
}

View File

@ -94,7 +94,7 @@ var ObjectManager = class {
(initable, result) => {
try {
initable.init_finish(result);
} catch(e) {
} catch (e) {
logError(e, 'could not initialize proxy for interface ' + interfaceName);
if (onFinished)
@ -156,7 +156,7 @@ var ObjectManager = class {
_onManagerProxyLoaded(initable, result) {
try {
initable.init_finish(result);
} catch(e) {
} catch (e) {
logError(e, 'could not initialize object manager for object ' + this._serviceName);
this._tryToCompleteLoad();

View File

@ -93,7 +93,7 @@ function spawnApp(argv) {
let context = global.create_app_launch_context(0, -1);
app.launch([], context);
} catch(err) {
} catch (err) {
_handleSpawnError(argv[0], err);
}
}

View File

@ -178,7 +178,7 @@ var WeatherClient = class {
(o, res) => {
try {
this._gclueService = Geoclue.Simple.new_finish(res);
} catch(e) {
} catch (e) {
log('Failed to connect to Geoclue2 service: ' + e.message);
this._setLocation(this._mostRecentLocation);
return;