title: Testing exceptions with BOOST
body: <p>I'm using boost test framework 1.47 and I'm having difficulties testing my exceptions</p>
  
  <p>Here is my exception class</p>
  
  <pre><code>class VideoCaptureException : public std::exception
  {
  
      std::string m_Description;
  public:
      VideoCaptureException(const char* description)
      {
          m_Description = std::string(description);
      }
      VideoCaptureException(const std::string&amp; description)
      {
          m_Description = description;
      }
      virtual ~VideoCaptureException() throw() {}
      virtual const char* what() const throw()
      {
          return m_Description.c_str();
      }
  }
  </code></pre>
  
  <p>I'm trying to test code that simply throws this exception</p>
  
  <pre><code>BOOST_CHECK_THROW( source.StopCapture(), VideoCaptureException )
  </code></pre>
  
  <p>For some reason it doesn't work.</p>
  
  <pre><code>unknown location(0): fatal error in "testVideoCaptureSource": unknown type
  testVideoCaptureSource.cpp(28): last checkpoint
  </code></pre>
  
  <p>What is it that I'm doing wrong?</p>