2013-10-07 11:13:24 +02:00
|
|
|
#include "vexceptionuniqueid.h"
|
|
|
|
|
|
|
|
VExceptionUniqueId::VExceptionUniqueId(const QString &what, const QDomElement &domElement)
|
2013-11-04 21:35:15 +01:00
|
|
|
:VException(what), tagText(QString()), tagName(QString()), lineNumber(-1)
|
|
|
|
{
|
|
|
|
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
|
2013-10-07 11:13:24 +02:00
|
|
|
QTextStream stream(&tagText);
|
|
|
|
domElement.save(stream, 4);
|
|
|
|
tagName = domElement.tagName();
|
|
|
|
lineNumber = domElement.lineNumber();
|
|
|
|
}
|
|
|
|
|
2013-11-04 21:35:15 +01:00
|
|
|
QString VExceptionUniqueId::ErrorMessage() const
|
|
|
|
{
|
2013-10-07 11:13:24 +02:00
|
|
|
QString error = QString("ExceptionUniqueId: %1").arg(what);
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
2013-11-04 21:35:15 +01:00
|
|
|
QString VExceptionUniqueId::DetailedInformation() const
|
|
|
|
{
|
2013-10-07 11:13:24 +02:00
|
|
|
QString detail = QString("tag: %1 in line %2\nFull tag:\n%3").arg(tagName).arg(lineNumber).arg(tagText);
|
|
|
|
return detail;
|
|
|
|
}
|