aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-08-08 16:59:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-20 14:20:44 +0200
commite43b6bd9c7a3d584e488cd3c84f9deb2d8955b64 (patch)
tree0d1a33571d2f75630db3dfe84b1a4ead23f87958 /tools
parent42b2685d0069e746dee344054831b6f08e482860 (diff)
Remove QV4::DiagnosticMessage
QQmlError provides the same functionality, so let's rather use that where required. Remove the dependency of codegen onto the ExecutionContext that was only required for error handling. Change-Id: Ib0b61c0e138f89ff989c32996c93c339e4b62223 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/v4/main.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/tools/v4/main.cpp b/tools/v4/main.cpp
index 69090c7e2c..225a4f11fb 100644
--- a/tools/v4/main.cpp
+++ b/tools/v4/main.cpp
@@ -121,19 +121,7 @@ static void showException(QV4::ExecutionContext *ctx, const QV4::Exception &exce
if (!e) {
std::cerr << "Uncaught exception: " << qPrintable(exception.value().toString(ctx)->toQString()) << std::endl;
} else {
- if (QV4::SyntaxErrorObject *err = e->asSyntaxError()) {
- QV4::DiagnosticMessage *msg = err->message();
- if (!msg) {
- std::cerr << "Uncaught exception: Syntax error" << std::endl;
- return;
- }
-
- for (; msg; msg = msg->next) {
- std::cerr << qPrintable(msg->buildFullMessage(ctx)->toQString()) << std::endl;
- }
- } else {
- std::cerr << "Uncaught exception: " << qPrintable(e->get(ctx->engine->newString(QStringLiteral("message")), 0).toString(ctx)->toQString()) << std::endl;
- }
+ std::cerr << "Uncaught exception: " << qPrintable(e->get(ctx->engine->newString(QStringLiteral("message")), 0).toString(ctx)->toQString()) << std::endl;
}
foreach (const QV4::ExecutionEngine::StackFrame &frame, exception.stackTrace()) {