Public Member Functions | Public Attributes | List of all members # Exception Class Reference

Class passed to an error. More…



Public Member Functions

Exception ()

Exception (int _code, const char *_err, const char *_func, const char *_file, int _line)

virtual ~Exception () throw ()

virtual const char * what () const throw ()

void formatMessage ()

Public Attributes

std::string msg

int code

std::string err

std::string func

std::string file

int line

Detailed Description

Class passed to an error.

This class encapsulates all or almost all necessary information about the error happened in the program. The exception is usually constructed and thrown implicitly via BMF_Error

See also error

Constructor & Destructor Documentation

 Exception() [1/2]

Exception::Exception (  )  

Default constructor

 Exception() [2/2]

Exception::Exception ( int _code, 
  const char * _err, 
  const char * _func, 
  const char * _file, 
  int _line 

Full constructor. Normally the constructor is not called explicitly. Instead, the macros BMF_Error() , BMF_Error_() are used.


virtual Exception::~Exception (  )  
throw (  


Member Function Documentation


void Exception::formatMessage (  )  


virtual const char* Exception::what (  ) const 
throw (  



Member Data Documentation


int Exception::code 

error code

See also BMFStatus


std::string Exception::err 

error description


std::string Exception::file 

source file name where the error has occurred


std::string Exception::func 

function name. Available only when the compiler supports getting it


int Exception::line 

line number in the source file where the error has occurred


std::string Exception::msg 

the formatted error message

  • /20230627/doxygen_converter/bmf/bmf/sdk/cpp_sdk/include/bmf/sdk/ exception_factory.h

Last modified February 19, 2024 : fix baidu statistics (daa0758)