Added more debugging info to rewriterview

Reviewed-by: erikv
This commit is contained in:
Lasse Holmstedt
2010-06-03 11:33:40 +02:00
parent c9062b5e9f
commit 7ba6ad38ad

View File

@@ -404,8 +404,10 @@ void RewriterView::applyChanges()
clearErrors(); clearErrors();
if (inErrorState()) { if (inErrorState()) {
const QString content = textModifierContent();
qDebug() << "RewriterView::applyChanges() got called while in error state. Will do a quick-exit now."; 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 { try {
@@ -414,11 +416,17 @@ void RewriterView::applyChanges()
enterErrorState(errors().first().description()); enterErrorState(errors().first().description());
} }
} catch (Exception &e) { } catch (Exception &e) {
const QString content = textModifierContent();
qDebug() << "RewriterException:" << m_rewritingErrorMessage;
qDebug() << "Content:" << content;
enterErrorState(e.description()); enterErrorState(e.description());
} }
if (inErrorState()) { 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);
} }
} }