File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/geophires_monte_carlo Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -358,6 +358,7 @@ def main(command_line_args=None):
358
358
if 'MC_OUTPUT_FILE' in args and args .MC_OUTPUT_FILE is not None
359
359
else str (Path (Path (args .Input_file ).parent , 'MC_Result.txt' ).absolute ())
360
360
)
361
+ code_file_name = Path (args .Code_File ).name
361
362
python_path = 'python'
362
363
html_path = ''
363
364
@@ -451,6 +452,14 @@ def main(command_line_args=None):
451
452
df = pd .DataFrame (results_pd )
452
453
453
454
# Compute the stats along the specified axes.
455
+ if len (results ) < 1 :
456
+ # TODO surface actual exceptions instead of giving this generic message
457
+ raise RuntimeError (
458
+ 'No MC results generated, '
459
+ f'this is likely caused by { code_file_name } throwing an exception '
460
+ f'when run with your input file.'
461
+ )
462
+
454
463
mins = np .nanmin (results , 0 )
455
464
maxs = np .nanmax (results , 0 )
456
465
medians = np .nanmedian (results , 0 )
You can’t perform that action at this time.
0 commit comments