Commit fa909aa9 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

use a better C++ exception wrapper to handle non OpenCV exceptions (as pure C++ one)

CCBUGS: 335624
CCBUGS: 330342
CCBUGS: 329873
CCBUGS: 326742
CCBUGS: 326586
CCBUGS: 326585
CCBUGS: 324774
CCBUGS: 323888
CCBUGS: 323361
CCBUGS: 320812
CCBUGS: 312440
CCBUGS: 309027
CCBUGS: 308645
CCBUGS: 301611
CCBUGS: 297558
CCBUGS: 285517
parent 1260bff3
......@@ -159,6 +159,10 @@ QList<QRectF> FaceDetector::detectFaces(const QImage& image, const QSize& origin
{
kError() << "cv::Exception:" << e.what();
}
catch(...)
{
kError() << "Default exception from OpenCV";
}
return result;
}
......
......@@ -11,7 +11,7 @@
* <a href="mailto:marcel dot wiesweg at gmx dot de">marcel dot wiesweg at gmx dot de</a>
* @author Copyright (C) 2010 by Aditya Bhatt
* <a href="mailto:adityabhatt1991 at gmail dot com">adityabhatt1991 at gmail dot com</a>
* @author Copyright (C) 2010-2013 by Gilles Caulier
* @author Copyright (C) 2010-2014 by Gilles Caulier
* <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
*
* This program is free software; you can redistribute it
......@@ -60,7 +60,6 @@
namespace KFaceIface
{
Identity::Identity()
: id(-1)
{
......@@ -623,6 +622,10 @@ QList<Identity> RecognitionDatabase::recognizeFaces(ImageListProvider* const ima
{
kError() << "cv::Exception:" << e.what();
}
catch(...)
{
kError() << "Default exception from OpenCV";
}
if (id == -1)
{
......@@ -665,6 +668,10 @@ static void trainSingle(Recognizer* const r, const Identity& identity, TrainingD
{
kError() << "cv::Exception:" << e.what();
}
catch(...)
{
kError() << "Default exception from OpenCV";
}
}
}
......@@ -696,6 +703,10 @@ static void trainIdentityBatch(Recognizer* const r, const QList<Identity>& ident
{
kError() << "cv::Exception preparing image for LBPH:" << e.what();
}
catch(...)
{
kError() << "Default exception from OpenCV";
}
}
try
......@@ -707,6 +718,10 @@ static void trainIdentityBatch(Recognizer* const r, const QList<Identity>& ident
{
kError() << "cv::Exception training LBPH:" << e.what();
}
catch(...)
{
kError() << "Default exception from OpenCV";
}
}
}
......
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