File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -272,10 +272,13 @@ def run(self):
272272 f"{ clsname } ().render()" ,
273273 ]
274274
275- with tempconfig (example_config ):
276- run_time = timeit (lambda : exec ("\n " .join (code ), globals ()), number = 1 )
277- video_dir = config .get_dir ("video_dir" )
278- images_dir = config .get_dir ("images_dir" )
275+ try :
276+ with tempconfig (example_config ):
277+ run_time = timeit (lambda : exec ("\n " .join (code ), globals ()), number = 1 )
278+ video_dir = config .get_dir ("video_dir" )
279+ images_dir = config .get_dir ("images_dir" )
280+ except Exception as e :
281+ raise RuntimeError (f"Error while rendering example { clsname } " ) from e
279282
280283 _write_rendering_stats (
281284 clsname ,
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ def default(self, obj: Any):
207207 del cvardict [i ]
208208 try :
209209 code = inspect .getsource (obj )
210- except OSError :
210+ except ( OSError , TypeError ) :
211211 # This happens when rendering videos included in the documentation
212212 # within doctests and should be replaced by a solution avoiding
213213 # hash collision (due to the same, empty, code strings) at some point.
You can’t perform that action at this time.
0 commit comments