Skip to content
Snippets Groups Projects
Commit ab158afa authored by John Romein's avatar John Romein
Browse files

Task #3696

Put error code in message if error code not recognized.
parent 766a505c
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
namespace LOFAR { namespace LOFAR {
namespace RTCP { namespace RTCP {
const char *errorMessage(cl_int error) std::string errorMessage(cl_int error)
{ {
switch (error) { switch (error) {
case CL_SUCCESS: return "Success!"; case CL_SUCCESS: return "Success!";
...@@ -61,7 +61,7 @@ const char *errorMessage(cl_int error) ...@@ -61,7 +61,7 @@ const char *errorMessage(cl_int error)
case CL_INVALID_GL_OBJECT: return "Invalid OpenGL object"; case CL_INVALID_GL_OBJECT: return "Invalid OpenGL object";
case CL_INVALID_BUFFER_SIZE: return "Invalid buffer size"; case CL_INVALID_BUFFER_SIZE: return "Invalid buffer size";
case CL_INVALID_MIP_LEVEL: return "Invalid mip-map level"; case CL_INVALID_MIP_LEVEL: return "Invalid mip-map level";
default: return "Unknown"; default: std::stringstream str; str << "Unknown (" << error << ')'; return str.str();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment