Closed define-private-public closed 7 years ago
@define-private-public can you add those and create a pull request? cheers!
I added the remaining error codes to the backend. You can now check e.g. against gphoto2cffi.backend.lib.GP_ERROR_IO
instead of -7
.
Hi,
I was working on my project where I need to poll for a live feed using
get_preview()
, but it's possible that the user may turn off the camera, thus throwing aGhoto2Error
with anerror_code
of-7
. After poking through thelibphoto2
source, I found out that there is a second header file that has error codes, and IIRC, a lot of them are missing fromerrors.py
.The file can be found in
libgphoto2_port/gphoto2/gphoto2-port-result.h
. Can you add some of these error codes to the library? I can understand if making full blown custom exceptions for them might be a bit, but I'd rather use an error code from the library than have to hard code in-7
in my application.Thanks, ~Ben