[cffi-devel] wrapping opencv's cvError

Joeish W joeish80829 at yahoo.com
Tue Oct 15 21:16:07 UTC 2013


I wrapped  opencv's cvError like this



;;  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


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

here is the error

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20131015/a8bb2817/attachment.html>


More information about the cffi-devel mailing list