[gnome-shell] Scripting: exit if the perf script throws an error during collection
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Scripting: exit if the perf script throws an error during collection
- Date: Sun, 29 Jun 2014 22:30:41 +0000 (UTC)
commit 910c95fa9bab1183edf88e605cdee6e46a7dfbf3
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon May 19 21:34:04 2014 -0400
Scripting: exit if the perf script throws an error during collection
If an exception occurs while collecting parameters, exit rather than
just leaving the shell running in the main loop.
https://bugzilla.gnome.org/show_bug.cgi?id=732349
js/ui/scripting.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/scripting.js b/js/ui/scripting.js
index 1da99d9..72f6702 100644
--- a/js/ui/scripting.js
+++ b/js/ui/scripting.js
@@ -360,7 +360,12 @@ function runPerfScript(scriptModule, outputFile) {
_step(g,
function() {
- _collect(scriptModule, outputFile);
+ try {
+ _collect(scriptModule, outputFile);
+ } catch (err) {
+ log("Script failed: " + err + "\n" + err.stack);
+ Meta.exit(Meta.ExitCode.ERROR);
+ }
Meta.exit(Meta.ExitCode.SUCCESS);
},
function(err) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]