Skip to content
This repository
Browse code

Working on build in OS X

  • Loading branch information...
commit 8d618a523ad53f97c865857f433b30329ef87fa0 1 parent 48996e2
Peter Braden authored

Showing 3 changed files with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +2 1  src/OpenCV.cc
  2. +4 1 src/OpenCV.h
  3. +0 4 src/init.cc
3  src/OpenCV.cc
@@ -71,7 +71,8 @@ OpenCV::ReadImage(const Arguments &args) {
71 71 return Undefined();
72 72
73 73 } catch( cv::Exception& e ){
74   - return v8::ThrowException(v8::Exception::Error(v8::String::New("OpenCV Error")));
  74 + const char* err_msg = e.what();
  75 + return v8::ThrowException(v8::Exception::Error(v8::String::New(err_msg)));
75 76 }
76 77 };
77 78
5 src/OpenCV.h
... ... @@ -1,6 +1,10 @@
1 1 #ifndef __NODE_OPENCV_H__
2 2 #define __NODE_OPENCV_H__
3 3
  4 +#ifdef __cplusplus
  5 + #import "opencv2/opencv.hpp"
  6 +#endif
  7 +
4 8 #include <v8.h>
5 9 #include <node.h>
6 10 #include <node_object_wrap.h>
@@ -10,7 +14,6 @@
10 14 #include <highgui.h>
11 15 #include <string.h>
12 16
13   -
14 17 using namespace v8;
15 18 using namespace node;
16 19
4 src/init.cc
... ... @@ -1,7 +1,3 @@
1   -#ifdef __cplusplus
2   - #import "opencv2/opencv.hpp"
3   -#endif
4   -
5 1 #include "OpenCV.h"
6 2 #include "Point.h"
7 3 #include "Matrix.h"

0 comments on commit 8d618a5

Please sign in to comment.
Something went wrong with that request. Please try again.