diff options
Diffstat (limited to 'tools/example_gallery/main.py')
| -rw-r--r-- | tools/example_gallery/main.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/example_gallery/main.py b/tools/example_gallery/main.py index a34210722..35e09bce3 100644 --- a/tools/example_gallery/main.py +++ b/tools/example_gallery/main.py @@ -15,6 +15,7 @@ since there is no special requirements. import json import math import shutil +import sys from argparse import ArgumentParser, RawTextHelpFormatter from pathlib import Path from textwrap import dedent @@ -135,7 +136,12 @@ def get_code_tabs(files, project_dir): with open(_path, "r") as _f: _file_content = remove_licenses(_f.read()) except UnicodeDecodeError as e: - print(f"example_gallery: error decoding {_path}:{e}") + print(f"example_gallery: error decoding {project_dir}/{_path}:{e}", + file=sys.stderr) + raise + except FileNotFoundError as e: + print(f"example_gallery: error opening {project_dir}/{_path}:{e}", + file=sys.stderr) raise content += add_indent(_file_content, 2) |
