From d154496199ced6ae0a28a2bf44e90ce5b2ea6ac0 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Thu, 31 May 2012 15:57:39 -0400 Subject: [PATCH] fix exception for older opencv versions --- src/OpenCV.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/OpenCV.cc b/src/OpenCV.cc index 241ff2a..0468e9d 100644 --- a/src/OpenCV.cc +++ b/src/OpenCV.cc @@ -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 } };