forked from qt-creator/qt-creator
Added more debugging info to rewriterview
Reviewed-by: erikv
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user