Better error when no solution found
marcosfelt opened this issue · comments
Currently, when the solver doesn't find a solution, it raises a generic exception. Using a generic exception makes it difficult to specifically catch failed solutions and do custom error handling.
Line 2140 in 3e2698a
Would you accept a PR that creates a custom error for failed solutions?
Try setting debug=0
to allow the code to proceed without the exception with m.solve(debug=0)
. The status is reported by m.options.APPSTATUS or m.options.APPINFO for more specific error information.