mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-24 07:55:35 +08:00
Issue #77 Break cyclic dependency statusmessage <-> jsonexception
This commit is contained in:
@@ -7,9 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "blackmisc/jsonexception.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/logcategorylist.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/range.h"
|
||||
#include <QStringBuilder>
|
||||
#include <QThreadStorage>
|
||||
#include <vector>
|
||||
@@ -28,22 +26,12 @@ namespace BlackMisc
|
||||
void CJsonException::anchor()
|
||||
{ }
|
||||
|
||||
CStatusMessage CJsonException::toStatusMessage(const CLogCategoryList &categories, const QString &prefix) const
|
||||
{
|
||||
return CStatusMessage(categories).validationError(toString(prefix));
|
||||
}
|
||||
|
||||
QString CJsonException::toString(const QString &prefix) const
|
||||
{
|
||||
if (prefix.isEmpty()) { return QStringLiteral("%1 in '%2'").arg(what()).arg(getStackTrace()); }
|
||||
return QStringLiteral("%1: %2 in '%3'").arg(prefix).arg(what()).arg(getStackTrace());
|
||||
}
|
||||
|
||||
void CJsonException::toLogMessage(const CLogCategoryList &categories, const QString &prefix) const
|
||||
{
|
||||
CLogMessage(categories).validationError(toString(prefix));
|
||||
}
|
||||
|
||||
QString CJsonException::stackString()
|
||||
{
|
||||
QStringList list;
|
||||
|
||||
Reference in New Issue
Block a user