help wrapping opencv's cvError

Discussion of Common Lisp

help wrapping opencv's cvError

Postby joeish80829 » Tue Oct 15, 2013 2:17 pm

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-" 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-, 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 would i go about getting this error(above) to show up on the lisp side
Posts: 153
Joined: Tue Sep 03, 2013 5:32 am

Return to Common Lisp

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 1 guest