Browse files

Working on build in OS X

  • Loading branch information...
1 parent 48996e2 commit 8d618a523ad53f97c865857f433b30329ef87fa0 @peterbraden committed Jun 22, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −1 src/OpenCV.cc
  2. +4 −1 src/OpenCV.h
  3. +0 −4 src/init.cc
View
3 src/OpenCV.cc
@@ -71,7 +71,8 @@ OpenCV::ReadImage(const Arguments &args) {
return Undefined();
} catch( cv::Exception& e ){
- return v8::ThrowException(v8::Exception::Error(v8::String::New("OpenCV Error")));
+ const char* err_msg = e.what();
+ return v8::ThrowException(v8::Exception::Error(v8::String::New(err_msg)));
}
};
View
5 src/OpenCV.h
@@ -1,6 +1,10 @@
#ifndef __NODE_OPENCV_H__
#define __NODE_OPENCV_H__
+#ifdef __cplusplus
+ #import "opencv2/opencv.hpp"
+#endif
+
#include <v8.h>
#include <node.h>
#include <node_object_wrap.h>
@@ -10,7 +14,6 @@
#include <highgui.h>
#include <string.h>
-
using namespace v8;
using namespace node;
View
4 src/init.cc
@@ -1,7 +1,3 @@
-#ifdef __cplusplus
- #import "opencv2/opencv.hpp"
-#endif
-
#include "OpenCV.h"
#include "Point.h"
#include "Matrix.h"

0 comments on commit 8d618a5

Please sign in to comment.