How to handle OpenCV warnings?
I've tried to make an error handler if a user provided invalid URL for an IP Cam.
try:
cam = cv2.VideoCapture(user_config.CAMERA_IP)
except Exception, e:
print "Unable to access camera"
However, OpenCV outputs a warning instead of error
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:856) warning: http://admin:[email protected]:80... (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:857)
so it didn't get captured. Is there a way to handle this warning?