OpenCV  3.0.0-dev
Open Source Computer Vision
Public Member Functions | Public Attributes | List of all members

Class passed to an error. More...

#include "core.hpp"

Inheritance diagram for cv::Exception:
cvflann::FLANNException

Public Member Functions

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

Public Attributes

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

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 CV_Error and CV_Error_ macros.

See also
error
Examples:
pca.cpp.

Constructor & Destructor Documentation

cv::Exception::Exception ( )

Default constructor

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.

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

Member Function Documentation

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

Member Data Documentation

int cv::Exception::code

error code

See also
CVStatus
String cv::Exception::err

error description

String cv::Exception::file

source file name where the error has occured

String cv::Exception::func

function name. Available only when the compiler supports getting it

int cv::Exception::line

line number in the source file where the error has occured

String cv::Exception::msg

the formatted error message

Examples:
pca.cpp.

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