Skip to content

Commit

Permalink
Add a better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlatr committed Oct 26, 2023
1 parent 854636d commit 560a692
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pydoctor/sphinx_ext/build_apidocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ def on_build_finished(app: Sphinx, exception: Exception) -> None:

temp_path = output_path.with_suffix('.pydoctor_temp')
shutil.rmtree(sphinx_files, ignore_errors=True)
output_path.rename(sphinx_files)
try:
output_path.rename(sphinx_files)
except FileNotFoundError as e:
msg = str(e)
msg += '\nMake sur the pydoctor option --html-output is correctly configured.'
raise FileNotFoundError(msg) from e
temp_path.rename(output_path)


Expand Down

0 comments on commit 560a692

Please sign in to comment.