From 7ba6ad38ad2a9791837a8e62c7d6e6fce01d4adc Mon Sep 17 00:00:00 2001 From: Lasse Holmstedt <lasse.holmstedt@nokia.com> Date: Thu, 3 Jun 2010 11:33:40 +0200 Subject: [PATCH] Added more debugging info to rewriterview Reviewed-by: erikv --- .../qmldesigner/designercore/model/rewriterview.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp index 71746b7f062..31a29ae8046 100644 --- a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp +++ b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp @@ -404,8 +404,10 @@ void RewriterView::applyChanges() clearErrors(); if (inErrorState()) { + const QString content = textModifierContent(); qDebug() << "RewriterView::applyChanges() got called while in error state. Will do a quick-exit now."; - throw RewritingException(__LINE__, __FUNCTION__, __FILE__, "RewriterView::applyChanges() already in error state", textModifierContent()); + qDebug() << "Content:" << content; + throw RewritingException(__LINE__, __FUNCTION__, __FILE__, "RewriterView::applyChanges() already in error state", content); } try { @@ -414,11 +416,17 @@ void RewriterView::applyChanges() enterErrorState(errors().first().description()); } } catch (Exception &e) { + const QString content = textModifierContent(); + qDebug() << "RewriterException:" << m_rewritingErrorMessage; + qDebug() << "Content:" << content; enterErrorState(e.description()); } if (inErrorState()) { - throw RewritingException(__LINE__, __FUNCTION__, __FILE__, m_rewritingErrorMessage, textModifierContent()); + const QString content = textModifierContent(); + qDebug() << "RewriterException:" << m_rewritingErrorMessage; + qDebug() << "Content:" << content; + throw RewritingException(__LINE__, __FUNCTION__, __FILE__, m_rewritingErrorMessage, content); } } -- GitLab