File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -441,7 +441,8 @@ def deterministic_sorter(doc_dict: DocDict) -> int:
441
441
# assert isinstance(er, str), er
442
442
# mess += f"\n- #{cnt}: {fd}: '{er}'"
443
443
# mess += f"\nLatest error was: '{o}'"
444
- # raise Exception(logger.warning(mess))
444
+ # logger.warning(mess)
445
+ # raise Exception(mess)
445
446
except MultiprocessTimeoutError as e :
446
447
raise Exception (
447
448
logger .warning (
@@ -639,7 +640,8 @@ def parse_recursive_paths(
639
640
if env .WDOC_BEHAVIOR_EXCL_INCL_USELESS == "warn" :
640
641
logger .warning (mess )
641
642
elif env .WDOC_BEHAVIOR_EXCL_INCL_USELESS == "crash" :
642
- raise Exception (logger .warning (mess ))
643
+ logger .warning (mess )
644
+ raise Exception (mess )
643
645
644
646
if exclude :
645
647
for iexc , exc in enumerate (exclude ):
@@ -656,7 +658,8 @@ def parse_recursive_paths(
656
658
if env .WDOC_BEHAVIOR_EXCL_INCL_USELESS == "warn" :
657
659
logger .warning (mess )
658
660
elif env .WDOC_BEHAVIOR_EXCL_INCL_USELESS == "crash" :
659
- raise Exception (logger .warning (mess ))
661
+ logger .warning (mess )
662
+ raise Exception (mess )
660
663
661
664
for i , d in enumerate (doclist ):
662
665
doc_kwargs = cli_kwargs .copy ()
Original file line number Diff line number Diff line change @@ -381,7 +381,8 @@ def load_one_doc_wrapped(
381
381
f"\n Full traceback:\n { formatted_tb } "
382
382
)
383
383
if loading_failure == "crash" :
384
- raise Exception (logger .warning (mess )) from err
384
+ logger .warning (mess )
385
+ raise Exception (mess ) from err
385
386
elif loading_failure == "warn" or env .WDOC_DEBUG :
386
387
logger .warning (mess )
387
388
return str (err )
@@ -521,7 +522,8 @@ def load_one_doc(
521
522
)
522
523
523
524
else :
524
- raise Exception (logger .warning (f"Unsupported filetype: '{ filetype } '" ))
525
+ logger .warning (f"Unsupported filetype: '{ filetype } '" )
526
+ raise Exception (f"Unsupported filetype: '{ filetype } '" )
525
527
526
528
docs = text_splitter .transform_documents (docs )
527
529
You can’t perform that action at this time.
0 commit comments