#ifndef BOOST_COMPUTE_EXCEPTION_CONTEXT_ERROR_HPP
#define BOOST_COMPUTE_EXCEPTION_CONTEXT_ERROR_HPP
#include <exception>
namespace boost {
namespace compute {
class context;
class context_error : public std::exception
{
public:
context_error(const context *context,
const char *errinfo,
const void *private_info,
size_t private_info_size) throw()
: m_context(context),
m_errinfo(errinfo),
m_private_info(private_info),
m_private_info_size(private_info_size)
{
}
~context_error() throw()
{
}
const char* what() const throw()
{
return m_errinfo;
}
const context* get_context_ptr() const throw()
{
return m_context;
}
const void* get_private_info_ptr() const throw()
{
return m_private_info;
}
size_t get_private_info_size() const throw()
{
return m_private_info_size;
}
private:
const context *m_context;
const char *m_errinfo;
const void *m_private_info;
size_t m_private_info_size;
};
} }
#endif