| Home | Libraries | People | FAQ | More

## Class program_build_failure

boost::compute::program_build_failure — A failure when building OpenCL program.

## Synopsis

    // In header: <boost/compute/exception/program_build_failure.hpp>

    class program_build_failure : public boost::compute::opencl_error {
    public:

      // public member functions
      explicit program_build_failure(cl_int, const std::string &);
      ~program_build_failure();
      std::string build_log() const;
    };

## Description

Instances of this class are thrown when OpenCL program build fails. Extends opencl_error by saving a program build log so it can be used for testing, debugging, or logging purposes.

See Also: opencl_error

### `program_build_failure` public member functions

1.     explicit program_build_failure(cl_int error, const std::string & build_log);

   Creates a new program_build_failure exception object for `error` and `build_log`.

2.     ~program_build_failure();

   Destroys the program_build_failure object.

3.     std::string build_log() const;

   Retrieve the log of a failed program build.