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.
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.
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.
https://github.com/BYU-PRISM/GEKKO/blob/3e2698a5324a5fce87a659c94ae3c7cd1bff7922/gekko/gekko.py#L2140
Would you accept a PR that creates a custom error for failed solutions?