Fixed error handling in QuadraticConstraints.py