Catch missed warning to pattern messages log.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2020-01-16 14:17:18 +02:00
parent 24e50455b0
commit 9c9c4f9abd

View File

@ -40,6 +40,7 @@
#include "../../../../dialogs/tools/dialoglineintersect.h" #include "../../../../dialogs/tools/dialoglineintersect.h"
#include "../../../../visualization/line/vistoollineintersect.h" #include "../../../../visualization/line/vistoollineintersect.h"
#include "../ifc/exception/vexception.h" #include "../ifc/exception/vexception.h"
#include "../ifc/exception/vexceptionobjecterror.h"
#include "../ifc/ifcdef.h" #include "../ifc/ifcdef.h"
#include "../vgeometry/vgobject.h" #include "../vgeometry/vgobject.h"
#include "../vgeometry/vpointf.h" #include "../vgeometry/vpointf.h"
@ -148,8 +149,11 @@ VToolLineIntersect* VToolLineIntersect::Create(VToolLineIntersectInitData initDa
if (intersect == QLineF::NoIntersection) if (intersect == QLineF::NoIntersection)
{ {
qWarning() << tr("Error calculating point '%1'. Lines (%2;%3) and (%4;%5) have no point of intersection") const QString errorMsg = tr("Error calculating point '%1'. Lines (%2;%3) and (%4;%5) have no point of "
"intersection")
.arg(initData.name, p1Line1->name(), p2Line1->name(), p1Line2->name(), p2Line2->name()); .arg(initData.name, p1Line1->name(), p2Line1->name(), p1Line2->name(), p2Line2->name());
qApp->IsPedantic() ? throw VExceptionObjectError(errorMsg) :
qWarning() << VAbstractApplication::patternMessageSignature + errorMsg;
} }
VPointF *p = new VPointF(fPoint, initData.name, initData.mx, initData.my); VPointF *p = new VPointF(fPoint, initData.name, initData.mx, initData.my);