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:
@ -406,7 +406,7 @@ var VPNRequestHandler = class {
|
||||
this._vpnChildFinished.bind(this));
|
||||
|
||||
this._writeConnection();
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
logError(e, 'error while spawning VPN auth helper');
|
||||
|
||||
this._agent.respond(requestId, Shell.NetworkAgentResponse.INTERNAL_ERROR);
|
||||
@ -423,7 +423,7 @@ var VPNRequestHandler = class {
|
||||
} else {
|
||||
try {
|
||||
this._stdin.write('QUIT\n\n', null);
|
||||
} catch(e) { /* ignore broken pipe errors */ }
|
||||
} catch (e) { /* ignore broken pipe errors */ }
|
||||
}
|
||||
|
||||
this.destroy();
|
||||
@ -472,7 +472,7 @@ var VPNRequestHandler = class {
|
||||
if (line == '' && this._previousLine == '') {
|
||||
try {
|
||||
this._stdin.write('QUIT\n\n', null);
|
||||
} catch(e) { /* ignore broken pipe errors */ }
|
||||
} catch (e) { /* ignore broken pipe errors */ }
|
||||
} else {
|
||||
this._agent.set_password(this._requestId, this._previousLine, line);
|
||||
this._previousLine = undefined;
|
||||
@ -560,7 +560,7 @@ var VPNRequestHandler = class {
|
||||
this._agent.set_password(this._requestId, groups[i], value);
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
// No output is a valid case it means "both secrets are stored"
|
||||
if (data.length > 0) {
|
||||
logError(e, 'error while reading VPN plugin output keyfile');
|
||||
@ -594,7 +594,7 @@ var VPNRequestHandler = class {
|
||||
this._stdin.write('SECRET_VAL=' + (value || '') + '\n\n', null);
|
||||
});
|
||||
this._stdin.write('DONE\n\n', null);
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
logError(e, 'internal error while writing connection to helper');
|
||||
|
||||
this._agent.respond(this._requestId, Shell.NetworkAgentResponse.INTERNAL_ERROR);
|
||||
@ -619,7 +619,7 @@ var NetworkAgent = class {
|
||||
try {
|
||||
let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null);
|
||||
monitor.connect('changed', () => { this._vpnCacheBuilt = false; });
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
log('Failed to create monitor for VPN plugin dir: ' + e.message);
|
||||
}
|
||||
|
||||
@ -631,7 +631,7 @@ var NetworkAgent = class {
|
||||
try {
|
||||
this._native.init_finish(res);
|
||||
this._initialized = true;
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
this._native = null;
|
||||
logError(e, 'error initializing the NetworkManager Agent');
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ var AuthenticationAgent = class {
|
||||
enable() {
|
||||
try {
|
||||
this._native.register();
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
log('Failed to register AuthenticationAgent');
|
||||
}
|
||||
}
|
||||
@ -350,7 +350,7 @@ var AuthenticationAgent = class {
|
||||
disable() {
|
||||
try {
|
||||
this._native.unregister();
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
log('Failed to unregister AuthenticationAgent');
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ var Tpl = null;
|
||||
var Tp = null;
|
||||
try {
|
||||
({ TelepathyGLib: Tp, TelepathyLogger: Tpl } = imports.gi);
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
log('Telepathy is not available, chat integration will be disabled.');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user