raise exception instead of exiting with useless error

This commit is contained in:
Robin Müller 2023-02-09 15:57:56 +01:00
parent 66e31885a7
commit 98ecaba93a
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 3 additions and 4 deletions

View File

@ -115,11 +115,10 @@ class InterfaceParser(FileParser):
)
sys.exit(1)
if not end_matched:
print(
"No end match detected when parsing interface files. "
"Make sure to use [EXPORT] : [END]"
raise ValueError(
f"No end match detected when parsing interface file {file_name}. "
f"Make sure to use [EXPORT] : [END]"
)
sys.exit(1)
file_conn_entry.sh = FileStartHelper(
start_name, first_entry_name_or_index, count, None
)