Commit b3cfe6b4 authored by Andrey Pavlenko's avatar Andrey Pavlenko Committed by OpenCV Buildbot

Merge pull request #2341 from alalek:ocl_fix_error_processing

parents ff9a0815 915fb632
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
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