Skip to content

Commit

Permalink
fix: fixed error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Nov 25, 2021
1 parent d9a55f3 commit fe6f460
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion biosimulators_utils/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.142'
__version__ = '0.1.143'
17 changes: 13 additions & 4 deletions biosimulators_utils/simulator/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,21 @@ def exec_sedml_docs_in_archive_with_simulator_cli(archive_filename, out_dir, sim
raise RuntimeError("The command '{}' could not be found".format(simulator_command))

except subprocess.CalledProcessError as exception:
raise RuntimeError("The command '{}' could not execute the archive:\n\n {}".format(
simulator_command, exception.stderr.replace('\n', '\n ')))
msg = "The command '{}' could not execute the archive{}".format(
simulator_command,
':\n\n ' + exception.stderr.replace('\n', '\n ')
if exception.stderr else
'.'
)
raise RuntimeError(msg)

except Exception as exception:
raise RuntimeError("The command '{}' could not execute the archive:\n\n {}".format(
simulator_command, str(exception).replace('\n', '\n ')))
raise RuntimeError("The command '{}' could not execute the archive{}".format(
simulator_command,
':\n\n ' + str(exception).replace('\n', '\n '))
if str(exception) else
'.'
)


def exec_sedml_docs_in_archive_with_containerized_simulator(
Expand Down

0 comments on commit fe6f460

Please sign in to comment.