Skip to content

Commit

Permalink
added error for unknown snstop arg
Browse files Browse the repository at this point in the history
  • Loading branch information
sseraj committed Jun 14, 2024
1 parent 180f2e7 commit 2bbb555
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyoptsparse/pySNOPT/pySNOPT.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,10 @@ def _snstop(self, ktcond, mjrprtlvl, minimize, n, nncon, nnobj, ns, itn, nmajor,
for snstopArg in self.getOption("snSTOP arguments"):
if snstopArg == "restartDict":
snstopArgs.append(restartDict)
else:
raise Error(f"Received unknown snSTOP argument {snstopArg}. "
+ "Please see 'snSTOP arguments' option in the pyOptSparse documentation "
+ "under 'SNOPT'.")

if not self.storeHistory:
raise Error("snSTOP function handle must be used with storeHistory=True")
Expand Down

0 comments on commit 2bbb555

Please sign in to comment.