aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qml/commands.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/qml/commands.js b/qml/commands.js
index 23f0a7f..f76af01 100644
--- a/qml/commands.js
+++ b/qml/commands.js
@@ -19,10 +19,14 @@ function execute(output, command) {
}
function exec(output, args) {
- var result = eval(args.join(' '));
+ try {
+ var result = eval(args.join(' '));
- if ( typeof result !== 'undefined' ) {
- output.log(result);
+ if ( typeof result !== 'undefined' ) {
+ output.log(result);
+ }
+ } catch (exception) {
+ output.error(exception);
}
}