OpenCV  2.4.13.3
Open Source Computer Vision
cv::Exception Class Reference

#include <core.hpp>

Inheritance diagram for cv::Exception:

Public Member Functions

 Exception ()
 
 Exception (int _code, const string &_err, const string &_func, const string &_file, int _line)
 
virtual ~Exception () throw ()
 
virtual const char * what () const throw ()
 
void formatMessage ()
 

Public Attributes

string msg
 the formatted error message More...
 
int code
 error code More...
 
string err
 error description More...
 
string func
 function name. Available only when the compiler supports getting it More...
 
string file
 source file name where the error has occured More...
 
int line
 line number in the source file where the error has occured More...
 

Detailed Description

The standard OpenCV exception class. Instances of the class are thrown by various functions and methods in the case of critical errors.

Constructor & Destructor Documentation

§ Exception() [1/2]

cv::Exception::Exception ( )

Default constructor

§ Exception() [2/2]

cv::Exception::Exception ( int  _code,
const string &  _err,
const string &  _func,
const string &  _file,
int  _line 
)

Full constructor. Normally the constuctor is not called explicitly. Instead, the macros CV_Error(), CV_Error_() and CV_Assert() are used.

§ ~Exception()

virtual cv::Exception::~Exception ( )
throw (
)
virtual

Member Function Documentation

§ formatMessage()

void cv::Exception::formatMessage ( )

§ what()

virtual const char* cv::Exception::what ( ) const
throw (
)
virtual
Returns
the error description and the context as a text string.

Member Data Documentation

§ code

int cv::Exception::code

error code

See also
CVStatus

§ err

string cv::Exception::err

error description

§ file

string cv::Exception::file

source file name where the error has occured

§ func

string cv::Exception::func

function name. Available only when the compiler supports getting it

§ line

int cv::Exception::line

line number in the source file where the error has occured

§ msg

string cv::Exception::msg

the formatted error message


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