Skip to content

Commit

Permalink
Raise RuntimeError instead of sys.exit in AGSOutputs
Browse files Browse the repository at this point in the history
  • Loading branch information
softwareengineerprogrammer committed Oct 1, 2024
1 parent efe0034 commit 6dbd4ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/geophires_x/AGSOutputs.py
Original file line number Diff line number Diff line change
@@ -222,12 +222,12 @@ def PrintOutputs(self, model: Model):

except BaseException as ex:
tb = sys.exc_info()[2]
msg = "Error: GEOPHIRES Failed to write the output file. Exiting....Line %i" % tb.tb_lineno
print(str(ex))
print("Error: GEOPHIRES Failed to write the output file. Exiting....Line %i" % tb.tb_lineno)
print(msg)
model.logger.critical(str(ex))
model.logger.critical(
"Error: GEOPHIRES Failed to write the output file. Exiting....Line %i" % tb.tb_lineno)
model.logger.critical(msg)
traceback.print_exc()
sys.exit()
raise RuntimeError(msg)

model.logger.info(f'Complete {str(__class__)}: {sys._getframe().f_code.co_name}')

0 comments on commit 6dbd4ab

Please sign in to comment.