Add better error messages

This commit is contained in:
zandercymatics 2023-11-13 08:16:51 -07:00
parent 6f528e8330
commit 1890cc8f26
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 27 additions and 4 deletions

View file

@ -867,8 +867,11 @@ class ExtraTransitionDomain:
)
else:
if not infer_filenames:
logger.error(f"Could not find file: {filename}")
continue
raise FileNotFoundError(
f"{TerminalColors.FAIL}"
f"Could not find file {filename} for {name}"
f"{TerminalColors.ENDC}"
)
# Infer filename logic #
# This mode is used for
@ -899,8 +902,11 @@ class ExtraTransitionDomain:
is_domain_escrow,
)
continue
# Log if we can't find the desired file
logger.error(f"Could not find file: {filename}")
raise FileNotFoundError(
f"{TerminalColors.FAIL}"
f"Could not find file {filename} for {name}"
f"{TerminalColors.ENDC}"
)
def clear_file_data(self):
for item in self.file_data.values():