Commit 7ba6ad38 authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

Added more debugging info to rewriterview

Reviewed-by: erikv
parent c9062b5e
......@@ -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);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment