1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #ifndef BOOST_COMPUTE_EXCEPTION_UNSUPPORTED_EXTENSION_ERROR_HPP
- #define BOOST_COMPUTE_EXCEPTION_UNSUPPORTED_EXTENSION_ERROR_HPP
- #include <exception>
- #include <sstream>
- #include <string>
- namespace boost {
- namespace compute {
- class unsupported_extension_error : public std::exception
- {
- public:
-
-
- explicit unsupported_extension_error(const char *extension) throw()
- : m_extension(extension)
- {
- std::stringstream msg;
- msg << "OpenCL extension " << extension << " not supported";
- m_error_string = msg.str();
- }
-
- ~unsupported_extension_error() throw()
- {
- }
-
- std::string extension_name() const throw()
- {
- return m_extension;
- }
-
-
- const char* what() const throw()
- {
- return m_error_string.c_str();
- }
- private:
- std::string m_extension;
- std::string m_error_string;
- };
- }
- }
- #endif
|