mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
refactoring catching all exceptions as const ref
This commit is contained in:
committed by
Alexander Alekhin
parent
b74b05d1b3
commit
2da56d5af6
@@ -149,7 +149,7 @@ void CommandLineParser::getByName(const String& name, bool space_delete, int typ
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception& e)
|
||||
catch (const Exception& e)
|
||||
{
|
||||
impl->error = true;
|
||||
impl->error_message = impl->error_message + "Parameter '"+ name + "': " + e.err + "\n";
|
||||
@@ -182,7 +182,7 @@ void CommandLineParser::getByIndex(int index, bool space_delete, int type, void*
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception& e)
|
||||
catch (const Exception& e)
|
||||
{
|
||||
impl->error = true;
|
||||
impl->error_message = impl->error_message + format("Parameter #%d: ", index) + e.err + "\n";
|
||||
|
||||
@@ -120,11 +120,11 @@ static bool openvx_LUT(Mat src, Mat dst, Mat _lut)
|
||||
lut.copyFrom(_lut);
|
||||
ivx::IVX_CHECK_STATUS(vxuTableLookup(ctx, ia, lut, ib));
|
||||
}
|
||||
catch (ivx::RuntimeError & e)
|
||||
catch (const ivx::RuntimeError& e)
|
||||
{
|
||||
VX_DbgThrow(e.what());
|
||||
}
|
||||
catch (ivx::WrapperError & e)
|
||||
catch (const ivx::WrapperError& e)
|
||||
{
|
||||
VX_DbgThrow(e.what());
|
||||
}
|
||||
|
||||
@@ -648,11 +648,11 @@ static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv
|
||||
pstddev[c] = 0;
|
||||
}
|
||||
}
|
||||
catch (ivx::RuntimeError & e)
|
||||
catch (const ivx::RuntimeError & e)
|
||||
{
|
||||
VX_DbgThrow(e.what());
|
||||
}
|
||||
catch (ivx::WrapperError & e)
|
||||
catch (const ivx::WrapperError & e)
|
||||
{
|
||||
VX_DbgThrow(e.what());
|
||||
}
|
||||
|
||||
@@ -433,11 +433,11 @@ static bool openvx_minMaxIdx(Mat &src, double* minVal, double* maxVal, int* minI
|
||||
ofs2idx(src, maxidx, maxIdx);
|
||||
}
|
||||
}
|
||||
catch (ivx::RuntimeError & e)
|
||||
catch (const ivx::RuntimeError & e)
|
||||
{
|
||||
VX_DbgThrow(e.what());
|
||||
}
|
||||
catch (ivx::WrapperError & e)
|
||||
catch (const ivx::WrapperError & e)
|
||||
{
|
||||
VX_DbgThrow(e.what());
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ cvOpenFileStorage( const char* query, CvMemStorage* dststorage, int flags, const
|
||||
|
||||
//mode = cvGetErrMode();
|
||||
//cvSetErrMode( CV_ErrModeSilent );
|
||||
CV_TRY
|
||||
try
|
||||
{
|
||||
switch (fs->fmt)
|
||||
{
|
||||
@@ -427,7 +427,7 @@ cvOpenFileStorage( const char* query, CvMemStorage* dststorage, int flags, const
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
CV_CATCH_ALL
|
||||
catch (...)
|
||||
{
|
||||
fs->is_opened = true;
|
||||
cvReleaseFileStorage( &fs );
|
||||
|
||||
@@ -756,11 +756,11 @@ static void* icvReadSeq( CvFileStorage* fs, CvFileNode* node )
|
||||
flags |= CV_SEQ_FLAG_HOLE;
|
||||
if( !strstr(flags_str, "untyped") )
|
||||
{
|
||||
CV_TRY
|
||||
try
|
||||
{
|
||||
flags |= icvDecodeSimpleFormat(dt);
|
||||
}
|
||||
CV_CATCH_ALL
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user