Fixed return in opencv exception handling