First time here? Check out the FAQ!
answered 2018-09-28 05:46:13 -0600
it does not throw an exception here, so you can't catch one.
you'll have to check:
if cam.isOpened(): # proceed..