mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
fix exception for older opencv versions
This commit is contained in:
parent
0c7d496c0d
commit
d154496199
@ -71,8 +71,12 @@ OpenCV::ReadImage(const Arguments &args) {
|
||||
return Undefined();
|
||||
|
||||
} catch( cv::Exception& e ){
|
||||
#if CV_MINOR_VERSION > 0
|
||||
const char* err_msg = e.what();
|
||||
return v8::ThrowException(v8::Exception::Error(v8::String::New(err_msg)));
|
||||
#else
|
||||
return v8::ThrowException(v8::Exception::Error(v8::String::New("OpenCV Error")));
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user