Image Component Library (ICL)
CLException.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLUtils/src/ICLUtils/CLException.cpp **
10 ** Module : ICLUtils **
11 ** Authors: Viktor Losing **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.GPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 #ifdef ICL_HAVE_OPENCL
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLUtils/Exception.h>
35 #include <string>
36 #include <sstream>
37 #include <iostream>
38 
39 using namespace std;
40 namespace icl {
41  namespace utils {
43  class CLException: public ICLException {
44  public:
45  static string getMessage(const int errorCode, const string message){
46  std::stringstream sstr;
47  sstr << message << " clErrorCode " << errorCode << endl;
48  return sstr.str();
49  }
50  CLException(const std::string &msg) throw() : ICLException(msg) {}
51  };
53  class CLInitException: public CLException {
54  public:
55  CLInitException(const std::string &msg) throw() : CLException(msg) {}
56  };
58  class CLBuildException: public CLException {
59  public:
60  CLBuildException(const std::string &msg) throw() : CLException(msg) {}
61  };
64  public:
65  CLBufferException(const std::string &msg) throw() : CLException(msg) {}
66  };
67 
70  public:
71  CLKernelException(const std::string &msg) throw() : CLException(msg) {}
72  };
73 
74  }
75 
76 }
77 #endif
78 
undocument this line if you encounter any issues!
Definition: Any.h:37
CLKernelException(const std::string &msg)
Definition: CLException.h:71
CLBufferException(const std::string &msg)
Definition: CLException.h:65
CLInitException(const std::string &msg)
Definition: CLException.h:55
Class for an OpenCL Exception associated with kernels.
Definition: CLException.h:69
CLException(const std::string &msg)
Definition: CLException.h:50
CLBuildException(const std::string &msg)
Definition: CLException.h:60
static string getMessage(const int errorCode, const string message)
Definition: CLException.h:45
Base class for an OpenCL Exception.
Definition: CLException.h:43
Class for an OpenCL Exception associated with buffers.
Definition: CLException.h:63
Base class for Exception handling in the ICL.
Definition: Exception.h:42
Class for an OpenCL Exception during kernel compiling.
Definition: CLException.h:58
Class for an OpenCL Exception during initialization.
Definition: CLException.h:53