Base class of all BitFlow exception classes.  
 More...
#include <BFException.hpp>
Base class of all BitFlow exception classes. 
- Examples: 
 - BiSimplePlusPlus.cpp, CircClassExample.cpp, and CircHoldSimple.cpp.
 
 
      
        
          | BFExceptionBase::BFExceptionBase  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
Construct the BFExceptionBase instance with no error. 
   37     : m_pd ( 
new PrivateData )
 
 
 
 
Construct a BFExceptionBase instance, copying the number and message from the exception to_copy.
- Parameters
 - 
  
    | [in] | to_copy | - The exception to be copied.  | 
  
   
   66     : m_pd ( 
new PrivateData(to_copy.m_pd->m_number, to_copy.m_pd->m_message) )
 
 
 
 
Construct a BFExceptionBase instance, taking the data from the exception to_take.
- Parameters
 - 
  
    | [in] | to_take | - The exception to be taken.  | 
  
   
   77     to_take.m_pd = 
nullptr;
 
 
 
 
  
  
      
        
          | BFExceptionBase::~BFExceptionBase  | 
          ( | 
          void  | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | BFExceptionBase::BFExceptionBase  | 
          ( | 
          const BFU32  | 
          number,  | 
         
        
           | 
           | 
          std::string const &  | 
          message  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Construct the BFExceptionBase instance with an error number and message.
- Parameters
 - 
  
  
 
   47     : m_pd ( 
new PrivateData(number, message) )
 
 
 
 
  
  
      
        
          | BFExceptionBase::BFExceptionBase  | 
          ( | 
          const BFU32  | 
          number,  | 
         
        
           | 
           | 
          std::string &&  | 
          message  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Construct the BFExceptionBase instance with an error number and message.
- Parameters
 - 
  
  
 
   57     : m_pd ( 
new PrivateData(number, std::move(message)) )
 
 
 
 
  
  
      
        
          | BFU32 BFExceptionBase::getErrorNumber  | 
          ( | 
          void  | 
           | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
 
Returns a string description of the error that occured.
- Parameters
 - 
  
    | [out] | errorText | - The pointer to the users allocated buffer that will store the text error message. | 
    | [in,out] | errorBufferSize | - As an input, this parameter is the number of bytes that errorText buffer can hold. As an output, the paramerter is overwritten with the number of bytes written to the errorText buffer when successful or the number of bytes the buffer needs to be to hold the full message if the buffer is too small. | 
  
   
- Returns
 - BI_OK if the method was successful, or on of the following on error:
 
References BI_ERROR_BUFFER_TOO_SMALL, BI_ERROR_NULL_TEXT_PTR, and getErrorText().
  144     const size_t inputSize = *errorBufferSize;
 
  145     const size_t errTxtSize = message.size() + 1;
 
  147     *errorBufferSize = 
BFU32(errTxtSize);
 
  154         std::memcpy(errorText, message.c_str(), std::min(inputSize, errTxtSize));
 
  155         errorText[inputSize - 1] = 0;
 
unsigned long BFU32
Definition: BFTypeNT.h:55
 
Definition: BiError.h:330
 
virtual std::string getErrorText(void) const 
Definition: BFException.cpp:164
 
Definition: BiError.h:332
 
 
 
 
  
  
      
        
          | std::string BFExceptionBase::getErrorText  | 
          ( | 
          void  | 
           | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Return the error text as a std::string. Throws a BFException on any error. 
Referenced by getErrorText(), and showErrorMsg().
  166     return m_pd->m_message;
 
 
 
 
Replace the data stored in this exception data taken from the exception to_take.
- Parameters
 - 
  
    | [in] | to_take | - The exception to be taken. | 
  
   
- Returns
 - A reference to this exception. 
 
  114     if (
this != &to_take)
 
  118         to_take.m_pd = 
nullptr;
 
 
 
 
  
  
      
        
          | BFU32 BFExceptionBase::showErrorMsg  | 
          ( | 
          void  | 
           | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Pops up a dialog displaying a text description of the error that was thrown.
- Returns
 - Returns one of the following:
- BI_OK - The user clicked on the ok button on the dialog.
 
- BI_CANCEL - The user clicked on the cancel button on the dialog. 
 
 
Reimplemented in BiException.
- Examples: 
 - BiSimplePlusPlus.cpp, CircClassExample.cpp, and CircHoldSimple.cpp.
 
References BI_CANCEL, BI_OK, getErrorNumber(), and getErrorText().
  189     std::ostringstream txtStrm;
 
  190     txtStrm << 
"BitFlow Error " << errorNumber << 
": " << 
getErrorText();
 
  192     UINT mType = MB_OKCANCEL|(BF_OK == errorNumber ? MB_ICONEXCLAMATION : MB_ICONERROR);
 
  193     const int uButton = MessageBoxA(NULL, txtStrm.str().c_str(), 
"Frame Grabber Error", mType);
 
unsigned long BFU32
Definition: BFTypeNT.h:55
 
virtual std::string getErrorText(void) const 
Definition: BFException.cpp:164
 
#define BI_CANCEL
Definition: BiDef.h:36
 
virtual BFU32 getErrorNumber(void) const 
Definition: BFException.cpp:172
 
 
 
 
The documentation for this class was generated from the following files: