Class cv::Exception#

Class passed to an error. View details

Collaboration diagram for cv::Exception:

cv::Exception Node1 cv::Exception   + Exception() + Exception() + ~Exception() + codeMessage() + formatMessage() + what() Node2 std::exception     Node2->Node1 Node3 std::string     Node3->Node1 +err +file +func +msg Node4 std::basic_string< Char >     Node4->Node3 Node5 Code     Node5->Node1 +code Node6 int     Node6->Node1 +line

cv::Exception Node1 cv::Exception   + Exception() + Exception() + ~Exception() + codeMessage() + formatMessage() + what() Node2 std::exception     Node2->Node1 Node3 std::string     Node3->Node1 +err +file +func +msg Node4 std::basic_string< Char >     Node4->Node3 Node5 Code     Node5->Node1 +code Node6 int     Node6->Node1 +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 CV_Error and CV_Error_ macros.

See also

error

Examples
samples/hog_tapi.cpp, samples/cpp/pca.cpp, and samples/python/snippets/watershed.py.

Constructor & Destructor Documentation#

Exception()#

cv::Exception::Exception()

Default constructor

Exception()#

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

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

~Exception()#

cv::Exception::~Exception()

Member Function Documentation#

codeMessage()#

const char * cv::Exception::codeMessage()

formatMessage()#

void cv::Exception::formatMessage()

what()#

const char * cv::Exception::what()

Returns

the error description and the context as a text string.

Member Data Documentation#

code#

Error::Code cv::Exception::code

error code

See also

CVStatus

err#

std::string cv::Exception::err

error description

file#

std::string cv::Exception::file

source file name where the error has occurred

func#

std::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 occurred

msg#

std::string cv::Exception::msg

the formatted error message

Source file#

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