class cv::Exception
Overview
Class passed to an error. Moreā¦
#include <core.hpp> class Exception: public std::exception { public: // fields int code; String err; String file; String func; int line; String msg; // construction Exception(); Exception( int _code, const String& _err, const String& _func, const String& _file, int _line ); // methods void formatMessage(); virtual const char* what() const; }; // direct descendants class FLANNException;
Detailed Documentation
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:
Fields
int code
error code
See also:
String err
error description
String file
source file name where the error has occurred
String func
function name. Available only when the compiler supports getting it
int line
line number in the source file where the error has occurred
String msg
the formatted error message
Construction
Exception()
Default constructor
Exception( int _code, const String& _err, const String& _func, const 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.
Methods
virtual const char* what() const
Returns:
the error description and the context as a text string.