mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 09:25:45 +08:00
Include error code description into the message (#10982)
This commit is contained in:
parent
c219f97f48
commit
dc1d9ae973
@ -248,9 +248,9 @@ const char* Exception::what() const throw() { return msg.c_str(); }
|
||||
void Exception::formatMessage()
|
||||
{
|
||||
if( func.size() > 0 )
|
||||
msg = format("OpenCV(%s) %s:%d: error: (%d) %s in function %s\n", CV_VERSION, file.c_str(), line, code, err.c_str(), func.c_str());
|
||||
msg = format("OpenCV(%s) %s:%d: error: (%d) %s: %s in function %s\n", CV_VERSION, file.c_str(), line, code, cvErrorStr(code), err.c_str(), func.c_str());
|
||||
else
|
||||
msg = format("OpenCV(%s) %s:%d: error: (%d) %s\n", CV_VERSION, file.c_str(), line, code, err.c_str());
|
||||
msg = format("OpenCV(%s) %s:%d: error: (%d) %s: %s\n", CV_VERSION, file.c_str(), line, code, cvErrorStr(code), err.c_str());
|
||||
}
|
||||
|
||||
static const char* g_hwFeatureNames[CV_HARDWARE_MAX_FEATURE] = { NULL };
|
||||
|
Loading…
Reference in New Issue
Block a user