Page 1 of 1

help wrapping opencv's cvError

Posted: Tue Oct 15, 2013 2:17 pm
by joeish80829
I wrapped opencv's cvError like this

Code: Select all

;;  void cvError(int status, const char* func_name, const char* err_msg, const char* file_name, int line)
(cffi:defcfun ("cvError" cv-error) :void
  (status :int)
  (func-name :string)
  (err-msg :string)
  (file-name :string)
  (line :int))
but the whole purpose of the function is to cause an error in c which it does perfectly when i run this at the repl

Code: Select all

(cv-error +stsoutofrange+ "SCALAR" "error" "/home/w/Documents/opencv-2.4.6.1/modules/calib3d/src/epnp.cpp" 1)
here is the error

Code: Select all

OpenCV Error: One of arguments' values is out of range (bew!) in SCALAR, file /home/w/Documents/opencv-2.4.6.1/modules/calib3d/src/epnp.cpp, line 1
terminate called after throwing an instance of 'cv::Exception'
but the thing is it causes the error in c on the inferior-lisp buffer in emacs on the repl buffer the repl just hangs....how would i go about getting this error(above) to show up on the lisp side