Skip to content

Commit

Permalink
More informative exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Jan 31, 2024
1 parent 6e67fc2 commit 876da1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/sdist/amici/antimony_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def antimony2sbml(ant_model: Union[str, Path]) -> str:
else:
status = ant.loadAntimonyString(ant_model)
if status < 0:
raise RuntimeError("Antimony model could not be loaded.")
raise RuntimeError(
f"Antimony model could not be loaded: {ant.getLastError()}"
)

if (main_module_name := ant.getMainModuleName()) is None:
raise AssertionError("There is no Antimony module.")
Expand Down

0 comments on commit 876da1f

Please sign in to comment.