Buffer Interface
Public Member Functions | Static Public Member Functions | List of all members
BFCiException Class Reference

Exception thrown when a BitFlow SDK error occurs. More...

#include <BFException.hpp>

Inheritance diagram for BFCiException:
BFExceptionBase

Public Member Functions

 BFCiException (void)
 
 BFCiException (Bd hBoard, const BFU32 error)
 
 BFCiException (BFCiException const &to_copy)
 
 BFCiException (BFCiException &&to_take)
 
BFCiExceptionoperator= (BFCiException const &to_copy)
 
BFCiExceptionoperator= (BFCiException &&to_take)
 
- Public Member Functions inherited from BFExceptionBase
 BFExceptionBase (void)
 
 BFExceptionBase (BFExceptionBase const &to_copy)
 
 BFExceptionBase (BFExceptionBase &&to_take)
 
virtual ~BFExceptionBase (void)
 
BFExceptionBaseoperator= (BFExceptionBase const &to_copy)
 
BFExceptionBaseoperator= (BFExceptionBase &&to_take)
 
virtual BFU32 getErrorText (PBFCHAR ErrorText, PBFU32 ErrorTextSize) const
 
virtual std::string getErrorText (void) const
 
virtual BFU32 getErrorNumber (void) const
 
virtual BFU32 showErrorMsg (void) const
 

Static Public Member Functions

static void check (Bd hBoard, const BFU32 error)
 
static std::string getErrorText (Bd hBoard, const BFU32 error)
 

Additional Inherited Members

- Protected Member Functions inherited from BFExceptionBase
 BFExceptionBase (const BFU32 number, std::string const &message)
 
 BFExceptionBase (const BFU32 number, std::string &&message)
 

Detailed Description

Exception thrown when a BitFlow SDK error occurs.

Note
This is based upon the BF/CiApi error stack, not the BiApi error stack.
See also
BFRC_Enum

Constructor & Destructor Documentation

BFCiException::BFCiException ( void  )

Initialize a BFCiException with the BF_OK as the error.

Referenced by check().

240 { }
BFCiException::BFCiException ( Bd  hBoard,
const BFU32  error 
)

Initialize a BFCiException with the given error code and message.

Parameters
[in]hBoard- The board which generated the error.
[in]error- The error code value to check.
249  : BFExceptionBase (error, getErrorText(hBoard, error))
250 { }
virtual std::string getErrorText(void) const
Definition: BFException.cpp:164
BFExceptionBase(void)
Definition: BFException.cpp:36
BFCiException::BFCiException ( BFCiException const &  to_copy)

Initialize a BFCiException as a copy of another BFCiException.

Parameters
[in]to_copy- The exception to copy.
258  : BFExceptionBase (to_copy)
259 { }
BFExceptionBase(void)
Definition: BFException.cpp:36
BFCiException::BFCiException ( BFCiException &&  to_take)

Initialize a BFCiException, taking the contents of another BFCiException.

Parameters
[in]to_take- The exception to take.
267  : BFExceptionBase ( std::move(to_take) )
268 { }
BFExceptionBase(void)
Definition: BFException.cpp:36

Member Function Documentation

void BFCiException::check ( Bd  hBoard,
const BFU32  error 
)
static

Throw a BFCiException, if error isn't BF_OK.

Parameters
[in]hBoard- The board which generated the error.
[in]error- The error code value to check.
Exceptions
BFCiExceptionthrown, initialized to error, if error isn't BF_OK.

References BFCiException().

Referenced by BFGTLUtilities::BaseNode::access(), BFGTLUtilities::PRIVATE_IMP::RegisterNodeBase::address(), BufferAcquisition::BufferInterface::bfRegName(), BufferAcquisition::BufferInterface::bfRegPoke(), BFGTLUtilities::Device::close(), BufferAcquisition::BufferInterface::cxpReadData(), BufferAcquisition::BufferInterface::cxpReadReg(), BufferAcquisition::BufferInterface::cxpWriteData(), BufferAcquisition::BufferInterface::cxpWriteReg(), BFGTLUtilities::PRIVATE_IMP::RegisterNodeBase::data(), BFGTLUtilities::BaseNode::description(), BFGTLUtilities::BaseNode::displayName(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::entryCount(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::entryName(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::entryNames(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::entrySymbolic(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::entrySymbolics(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::entryValue(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::entryValues(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::enumerateEntryName(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::enumerateEntrySymbolic(), BFGTLUtilities::PRIVATE_IMP::CategoryNodeBase::enumerateFeatureName(), BFGTLUtilities::Device::enumerateNodeName(), BFGTLUtilities::PRIVATE_IMP::CommandNodeBase::execute(), BufferAcquisition::BufferInterface::Properties::family_name(), BFGTLUtilities::PRIVATE_IMP::CategoryNodeBase::featureCount(), BFGTLUtilities::PRIVATE_IMP::CategoryNodeBase::featureNames(), BFGTLUtilities::PRIVATE_IMP::ValueNodeBase::fromString(), BufferAcquisition::BufferInterface::getCameraMode(), BFGTLUtilities::PRIVATE_IMP::RegisterNodeBase::getData(), BufferAcquisition::BufferInterface::getExposureControl(), BFGTLUtilities::Device::getNode(), BFGTLUtilities::Device::getNodeNames(), BFGTLUtilities::BaseNode::ignoreCache(), BFGTLUtilities::PRIVATE_IMP::IntegerNodeBase::increment(), BFGTLUtilities::PRIVATE_IMP::FloatNodeBase::increment(), BFGTLUtilities::PRIVATE_IMP::RegisterNodeBase::length(), BFGTLUtilities::PRIVATE_IMP::StringNodeBase::max_length(), BFGTLUtilities::PRIVATE_IMP::IntegerNodeBase::maximum(), BFGTLUtilities::PRIVATE_IMP::FloatNodeBase::maximum(), BFGTLUtilities::PRIVATE_IMP::IntegerNodeBase::minimum(), BFGTLUtilities::PRIVATE_IMP::FloatNodeBase::minimum(), BufferAcquisition::BufferInterface::Properties::model_name(), BFGTLUtilities::BaseNode::name(), BFGTLUtilities::Device::open(), BFGTLUtilities::Device::openSWConnector(), BFGTLUtilities::PRIVATE_IMP::CommandNodeBase::operator()(), CXPReg::Device::readData(), CXPReg::Device::readReg(), BufferAcquisition::BufferInterface::setAcqFrameSize(), BufferAcquisition::BufferInterface::setAcqROI(), BufferAcquisition::BufferInterface::setCameraMode(), BFGTLUtilities::PRIVATE_IMP::RegisterNodeBase::setData(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::setEntryName(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::setEntrySymbolic(), BFGTLUtilities::PRIVATE_IMP::EnumerationNodeBase::setEntryValue(), BufferAcquisition::BufferInterface::setExposureControl(), BufferAcquisition::BufferInterface::setExTriggerConnect(), BFGTLUtilities::BaseNode::setIgnoreCache(), BFGTLUtilities::PRIVATE_IMP::IntegerNodeBase::setValue(), BFGTLUtilities::PRIVATE_IMP::BooleanNodeBase::setValue(), BFGTLUtilities::PRIVATE_IMP::FloatNodeBase::setValue(), BFGTLUtilities::PRIVATE_IMP::StringNodeBase::setValue(), BFGTLUtilities::PRIVATE_IMP::EnumEntryNodeBase::symbolic(), BFGTLUtilities::BaseNode::toolTip(), BFGTLUtilities::PRIVATE_IMP::ValueNodeBase::toString(), BFGTLUtilities::BaseNode::type(), BFGTLUtilities::PRIVATE_IMP::IntegerNodeBase::value(), BFGTLUtilities::PRIVATE_IMP::BooleanNodeBase::value(), BFGTLUtilities::PRIVATE_IMP::FloatNodeBase::value(), BFGTLUtilities::PRIVATE_IMP::StringNodeBase::value(), BFGTLUtilities::PRIVATE_IMP::EnumEntryNodeBase::value(), CXPReg::Device::writeData(), and CXPReg::Device::writeReg().

213 {
214  if (BF_OK != error)
215  throw BFCiException(hBoard, error);
216 }
BFCiException(void)
Definition: BFException.cpp:239
std::string BFCiException::getErrorText ( Bd  hBoard,
const BFU32  error 
)
static

Return the error text associated with the given error code.

Parameters
[in]hBoard- The board which generated the error.
[in]error- The error code value to check.

References MAX_STRING.

225 {
226  std::vector<char> errTxt (MAX_STRING);
227  BFU32 errTxtSize = (BFU32)errTxt.size();
228 
229  if (BF_OK != BFErrorGetMes(hBoard, error, errTxt.data(), errTxtSize))
230  return "BF/Ci error code message unavailable.";
231 
232  errTxt.push_back(0);
233  return errTxt.data();
234 }
unsigned long BFU32
Definition: BFTypeNT.h:55
#define MAX_STRING
Definition: BFType.h:65
BFCiException & BFCiException::operator= ( BFCiException const &  to_copy)

Copy the contents of the exception to_copy.

Parameters
[in]to_copy- The exception to be copied.
Returns
Returns a reference to this exception.

References BFExceptionBase::operator=().

278 {
280  return *this;
281 }
BFExceptionBase & operator=(BFExceptionBase const &to_copy)
Definition: BFException.cpp:95
BFCiException & BFCiException::operator= ( BFCiException &&  to_take)

Take the contents of the exception to_take.

Parameters
[in]to_take- The exception to be taken.
Returns
Returns a reference to this exception.

References BFExceptionBase::operator=().

291 {
292  BFExceptionBase::operator=( std::move(to_take) );
293  return *this;
294 }
BFExceptionBase & operator=(BFExceptionBase const &to_copy)
Definition: BFException.cpp:95

The documentation for this class was generated from the following files: