Skip to content

Commit

Permalink
raise correct Error type
Browse files Browse the repository at this point in the history
  • Loading branch information
cdiener authored and Midnighter committed May 29, 2018
1 parent 70bdad4 commit 1ca1bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cobra/util/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def check_solver_status(status, raise_error=False):
elif (status in has_primals) and not raise_error:
warn("solver status is '{}'".format(status), UserWarning)
elif status is None:
raise RuntimeError(
raise OptimizationError(
"model was not optimized yet or solver context switched")
else:
raise OptimizationError("solver status is '{}'".format(status))
Expand Down

0 comments on commit 1ca1bf3

Please sign in to comment.