Commit feec6d7e authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #1893 from tompollok:3.4

parents 20efa8cc fcb266f7
......@@ -292,7 +292,7 @@ static void drawPlot(const cv::Mat curve, const std::string figureTitle, const i
*/
cv::waitKey(10);
}
}catch(cv::Exception e)
}catch(const cv::Exception& e)
{
std::cerr<<"Error using Retina : "<<e.what()<<std::endl;
}
......
......@@ -353,7 +353,7 @@ static void loadNewFrame(const std::string filenamePrototype, const int currentF
// jump to next frame
++currentFrameIndex;
}
}catch(cv::Exception e)
}catch(const cv::Exception& e)
{
std::cerr<<"Error using Retina : "<<e.what()<<std::endl;
}
......
......@@ -146,7 +146,7 @@ int main(int argc, char* argv[]) {
cv::waitKey(5);
}
}catch(cv::Exception e)
}catch(const cv::Exception& e)
{
std::cerr<<"Error using Retina : "<<e.what()<<std::endl;
}
......
......@@ -137,7 +137,7 @@ int main(int argc, char* argv[]) {
cv::imshow("Retina Magno", retinaOutput_magno);
cv::waitKey(10);
}
}catch(cv::Exception e)
}catch(const cv::Exception& e)
{
std::cerr<<"Error using Retina or end of video sequence reached : "<<e.what()<<std::endl;
}
......
......@@ -109,7 +109,7 @@ int main(int argc, char* argv[])
}
printf("Average: %.4fms\n", (double)total_time / total_loop_count / cv::getTickFrequency() * 1000.0);
}
catch(cv::Exception e)
catch(const cv::Exception& e)
{
std::cerr << "Error using Retina : " << e.what() << std::endl;
}
......
......@@ -368,7 +368,7 @@ void RetinaImpl::setup(String retinaParameterFile, const bool applyDefaultSetupO
cv::FileStorage fs(retinaParameterFile, cv::FileStorage::READ);
setup(fs, applyDefaultSetupOnFailure);
}
catch(Exception &e)
catch(const Exception &e)
{
printf("Retina::setup: wrong/unappropriate xml parameter file : error report :`n=>%s\n", e.what());
if (applyDefaultSetupOnFailure)
......@@ -422,7 +422,7 @@ void RetinaImpl::setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailur
setupIPLMagnoChannel(_retinaParameters.IplMagno.normaliseOutput, _retinaParameters.IplMagno.parasolCells_beta, _retinaParameters.IplMagno.parasolCells_tau, _retinaParameters.IplMagno.parasolCells_k, _retinaParameters.IplMagno.amacrinCellsTemporalCutFrequency,_retinaParameters.IplMagno.V0CompressionParameter, _retinaParameters.IplMagno.localAdaptintegration_tau, _retinaParameters.IplMagno.localAdaptintegration_k);
}
catch(Exception &e)
catch(const Exception &e)
{
printf("RetinaImpl::setup: resetting retina with default parameters\n");
if (applyDefaultSetupOnFailure)
......
......@@ -127,7 +127,7 @@ void RetinaOCLImpl::setup(String retinaParameterFile, const bool applyDefaultSet
cv::FileStorage fs(retinaParameterFile, cv::FileStorage::READ);
setup(fs, applyDefaultSetupOnFailure);
}
catch(Exception &e)
catch(const Exception &e)
{
std::cout << "RetinaOCLImpl::setup: wrong/inappropriate xml parameter file : error report :`n=>" << e.what() << std::endl;
if (applyDefaultSetupOnFailure)
......@@ -181,7 +181,7 @@ void RetinaOCLImpl::setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFai
setupIPLMagnoChannel(_retinaParameters.IplMagno.normaliseOutput, _retinaParameters.IplMagno.parasolCells_beta, _retinaParameters.IplMagno.parasolCells_tau, _retinaParameters.IplMagno.parasolCells_k, _retinaParameters.IplMagno.amacrinCellsTemporalCutFrequency, _retinaParameters.IplMagno.V0CompressionParameter, _retinaParameters.IplMagno.localAdaptintegration_tau, _retinaParameters.IplMagno.localAdaptintegration_k);
}
catch(Exception &e)
catch(const Exception &e)
{
std::cout << "RetinaOCLImpl::setup: resetting retina with default parameters" << std::endl;
if (applyDefaultSetupOnFailure)
......
......@@ -298,7 +298,7 @@ void TransientAreasSegmentationModuleImpl::setup(String segmentationParameterFil
// opening retinaParameterFile in read mode
cv::FileStorage fs(segmentationParameterFile, cv::FileStorage::READ);
setup(fs, applyDefaultSetupOnFailure);
}catch(cv::Exception &e)
}catch(const cv::Exception &e)
{
printf("Retina::setup: wrong/unappropriate xml parameter file : error report :`n=>%s\n", e.what());
if (applyDefaultSetupOnFailure)
......@@ -338,7 +338,7 @@ void TransientAreasSegmentationModuleImpl::setup(cv::FileStorage &fs, const bool
currFn["contextEnergy_spatialConstant"]>>_segmentationParameters.contextEnergy_spatialConstant;
setup(_segmentationParameters);
}catch(cv::Exception &e)
}catch(const cv::Exception &e)
{
std::cout<<"Retina::setup: resetting retina with default parameters"<<std::endl;
if (applyDefaultSetupOnFailure)
......
......@@ -93,7 +93,7 @@ int main(int argc, const char *argv[]) {
// input filename is given.
try {
read_csv(fn_csv, images, labels, labelsInfo);
} catch (cv::Exception& e) {
} catch (const cv::Exception& e) {
cerr << "Error opening file \"" << fn_csv << "\". Reason: " << e.msg << endl;
// nothing more we can do
exit(1);
......
......@@ -85,7 +85,7 @@ int main(int argc, const char *argv[]) {
// input filename is given.
try {
read_csv(fn_csv, images, labels);
} catch (cv::Exception& e) {
} catch (const cv::Exception& e) {
cerr << "Error opening file \"" << fn_csv << "\". Reason: " << e.msg << endl;
// nothing more we can do
exit(1);
......
......@@ -85,7 +85,7 @@ int main(int argc, const char *argv[]) {
// input filename is given.
try {
read_csv(fn_csv, images, labels);
} catch (cv::Exception& e) {
} catch (const cv::Exception& e) {
cerr << "Error opening file \"" << fn_csv << "\". Reason: " << e.msg << endl;
// nothing more we can do
exit(1);
......
......@@ -62,7 +62,7 @@ int main(int argc, const char *argv[]) {
// input filename is given.
try {
read_csv(fn_csv, images, labels);
} catch (cv::Exception& e) {
} catch (const cv::Exception& e) {
cerr << "Error opening file \"" << fn_csv << "\". Reason: " << e.msg << endl;
// nothing more we can do
exit(1);
......
......@@ -85,7 +85,7 @@ int main(int argc, const char *argv[]) {
// input filename is given.
try {
read_csv(fn_csv, images, labels);
} catch (cv::Exception& e) {
} catch (const cv::Exception& e) {
cerr << "Error opening file \"" << fn_csv << "\". Reason: " << e.msg << endl;
// nothing more we can do
exit(1);
......
......@@ -68,7 +68,7 @@ int main(int argc, const char *argv[]) {
// Read in the data (fails if no valid input filename is given, but you'll get an error message):
try {
read_csv(fn_csv, images, labels);
} catch (cv::Exception& e) {
} catch (const cv::Exception& e) {
cerr << "Error opening file \"" << fn_csv << "\". Reason: " << e.msg << endl;
// nothing more we can do
exit(1);
......
......@@ -85,9 +85,9 @@ addVariant("{{ fun.name }}", {{ fun.req|inputs|length }}, {{ fun.opt|inputs|leng
// [out =] namespace.fun(src1, ..., srcn, dst1, ..., dstn, opt1, ..., optn);
try {
{{ compose(fun) }}
} catch(cv::Exception& e) {
} catch(const cv::Exception& e) {
error(std::string("cv::exception caught: ").append(e.what()).c_str());
} catch(std::exception& e) {
} catch(const std::exception& e) {
error(std::string("std::exception caught: ").append(e.what()).c_str());
} catch(...) {
error("Uncaught exception occurred in {{fun.name}}");
......
......@@ -25,7 +25,7 @@ void mexFunction(int nlhs, mxArray* plhs[],
// [out =] namespace.fun(src1, ..., srcn, dst1, ..., dstn, opt1, ..., optn);
try {
throw cv::Exception(-1, "OpenCV exception thrown", __func__, __FILE__, __LINE__);
} catch(cv::Exception& e) {
} catch(const cv::Exception& e) {
mexErrMsgTxt(e.what());
} catch(...) {
mexErrMsgTxt("Incorrect exception caught!");
......
......@@ -24,7 +24,7 @@ void mexFunction(int nlhs, mxArray* plhs[],
// [out =] namespace.fun(src1, ..., srcn, dst1, ..., dstn, opt1, ..., optn);
try {
throw std::exception();
} catch(std::exception& e) {
} catch(const std::exception& e) {
mexErrMsgTxt(e.what());
} catch(...) {
mexErrMsgTxt("Incorrect exception caught!");
......
......@@ -149,7 +149,7 @@ static SceneNode& _getSceneNode(SceneManager* sceneMgr, const String& name)
if(mo)
return *mo->getParentSceneNode()->getParentSceneNode();
}
catch (ItemIdentityException&)
catch (const ItemIdentityException&)
{
// ignore
}
......@@ -159,7 +159,7 @@ static SceneNode& _getSceneNode(SceneManager* sceneMgr, const String& name)
if (!mo)
mo = sceneMgr->getMovableObject(name, "Light");
}
catch (ItemIdentityException&)
catch (const ItemIdentityException&)
{
// ignore
}
......
Markdown is supported
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