diff --git a/documentation.py b/documentation.py index 6bccad1..7d5daa5 100644 --- a/documentation.py +++ b/documentation.py @@ -159,7 +159,8 @@ class Docs: logging.info(pdf_cmd) p = subprocess.run(pdf_cmd, shell=True) if p.returncode != 0: - logging.error("pdf command failed") + logging.error("pdf generation failed") + raise RuntimeError(f"pdf generation failed with code {p.returncode}") def build_hugo_content(self, hugo_root: str) -> None: hugo_images = os.path.join(hugo_root, "images") diff --git a/project.py b/project.py index 0b9ece1..fc5ff2d 100644 --- a/project.py +++ b/project.py @@ -640,7 +640,8 @@ class Project: logging.info(pdf_cmd) p = subprocess.run(pdf_cmd, shell=True) if p.returncode != 0: - logging.error("pdf command failed") + logging.error("pdf generation failed") + raise RuntimeError(f"pdf generation failed with code {p.returncode}") # Read and return top-level GDS data from the final GDS file, using gdstk: def get_final_gds_top_cells(self):