core/ocl: change error processing for missed function
authorAlexander Alekhin <alexander.alekhin@itseez.com>
Fri, 14 Feb 2014 15:50:58 +0000 (19:50 +0400)
committerAlexander Alekhin <alexander.alekhin@itseez.com>
Fri, 14 Feb 2014 15:50:58 +0000 (19:50 +0400)
modules/core/src/opencl/runtime/opencl_clamdblas.cpp
modules/core/src/opencl/runtime/opencl_clamdfft.cpp
modules/core/src/opencl/runtime/opencl_core.cpp

index fceda79..420fdb9 100644 (file)
@@ -118,7 +118,9 @@ static void* openclamdblas_check_fn(int ID)
     void* func = CV_CL_GET_PROC_ADDRESS(e->fnName);
     if (!func)
     {
-        CV_Error(cv::Error::OpenCLApiCallError, cv::format("OpenCL AMD BLAS function is not available: [%s]", e->fnName));
+        throw cv::Exception(cv::Error::OpenCLApiCallError,
+                cv::format("OpenCL AMD BLAS function is not available: [%s]", e->fnName),
+                CV_Func, __FILE__, __LINE__);
     }
     *(e->ppFn) = func;
     return func;
index 2d8b964..36a9ed2 100644 (file)
@@ -118,7 +118,9 @@ static void* openclamdfft_check_fn(int ID)
     void* func = CV_CL_GET_PROC_ADDRESS(e->fnName);
     if (!func)
     {
-        CV_Error(cv::Error::OpenCLApiCallError, cv::format("OpenCL AMD FFT function is not available: [%s]", e->fnName));
+        throw cv::Exception(cv::Error::OpenCLApiCallError,
+                cv::format("OpenCL AMD FFT function is not available: [%s]", e->fnName),
+                CV_Func, __FILE__, __LINE__);
     }
     *(e->ppFn) = func;
     return func;
index df91f92..5dbc85e 100644 (file)
@@ -201,7 +201,9 @@ static void* opencl_check_fn(int ID)
     void* func = CV_CL_GET_PROC_ADDRESS(e->fnName);
     if (!func)
     {
-        CV_Error(cv::Error::OpenCLApiCallError, cv::format("OpenCL function is not available: [%s]", e->fnName));
+        throw cv::Exception(cv::Error::OpenCLApiCallError,
+                cv::format("OpenCL function is not available: [%s]", e->fnName),
+                CV_Func, __FILE__, __LINE__);
     }
     *(e->ppFn) = func;
     return func;