File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ def main(run_session_nbs: bool) -> None:
7070
7171 ep = GdsExecutePreprocessor (kernel_name = "python3" )
7272 td_collector = GdsTearDownCollector (kernel_name = "python3" )
73+ exceptions : List [RuntimeError ] = []
7374
7475 for notebook_filename in notebook_files :
7576 now = datetime .now ().strftime ("%Y-%m-%d %H:%M:%S" )
@@ -98,9 +99,14 @@ def main(run_session_nbs: bool) -> None:
9899 try :
99100 ep .preprocess (nb )
100101 except CellExecutionError as e :
101- print ( f"Error executing notebook { notebook_filename } : { e } " )
102+ exceptions . append ( RuntimeError ( f"Error executing notebook { notebook_filename } " , e ) )
102103 continue
103104
105+ if exceptions :
106+ for nb_ex in exceptions :
107+ print (nb_ex )
108+ raise RuntimeError (f"{ len (exceptions )} Errors occurred while executing notebooks" )
109+ else :
104110 print (f"Finished executing notebook { notebook_filename } " )
105111
106112
You can’t perform that action at this time.
0 commit comments