aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-10-24 10:09:30 +0200
committerLars Knoll <lars.knoll@digia.com>2012-10-24 11:40:11 +0200
commitc9c2b0c5411a9b3cfd11013021e4017eea5425c4 (patch)
tree1b08106f542f371e4b473e5cc46a01c9dd1e416d /main.cpp
parent39cb093255c23bcc68b765f0abc4ac461fce0c9c (diff)
Fix LLVM backend compilation.
Change-Id: I326cf2531a600fd09b888e9955052b29624ccdbe Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index f5f51c3016..bdd5b37dd9 100644
--- a/main.cpp
+++ b/main.cpp
@@ -169,15 +169,18 @@ int evaluateCompiledCode(const QStringList &files)
globalObject->setProperty(ctx, vm.identifier(QStringLiteral("print")),
QQmlJS::VM::Value::fromObject(new builtins::Print(ctx)));
- code(ctx);
-
- if (ctx->hasUncaughtException) {
+ void * buf = __qmljs_create_exception_handler(ctx);
+ if (setjmp(*(jmp_buf *)buf)) {
if (VM::ErrorObject *e = ctx->result.asErrorObject())
std::cerr << "Uncaught exception: " << qPrintable(e->value.toString(ctx)->toQString()) << std::endl;
else
std::cerr << "Uncaught exception: " << qPrintable(ctx->result.toString(ctx)->toQString()) << std::endl;
+ return -2;
}
+
+ code(ctx);
}
+
return 0;
}