From 9c9c4f9abda963d710fee689a5745b382e8368ca Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 16 Jan 2020 14:17:18 +0200 Subject: [PATCH] Catch missed warning to pattern messages log. --HG-- branch : develop --- .../toolpoint/toolsinglepoint/vtoollineintersect.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp index cfc588d77..fa4b4274b 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp @@ -40,6 +40,7 @@ #include "../../../../dialogs/tools/dialoglineintersect.h" #include "../../../../visualization/line/vistoollineintersect.h" #include "../ifc/exception/vexception.h" +#include "../ifc/exception/vexceptionobjecterror.h" #include "../ifc/ifcdef.h" #include "../vgeometry/vgobject.h" #include "../vgeometry/vpointf.h" @@ -148,8 +149,11 @@ VToolLineIntersect* VToolLineIntersect::Create(VToolLineIntersectInitData initDa if (intersect == QLineF::NoIntersection) { - qWarning() << 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()); + 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()); + qApp->IsPedantic() ? throw VExceptionObjectError(errorMsg) : + qWarning() << VAbstractApplication::patternMessageSignature + errorMsg; } VPointF *p = new VPointF(fPoint, initData.name, initData.mx, initData.my);