Skip to content

Commit

Permalink
Change assertion to proper error message
Browse files Browse the repository at this point in the history
Addresses: #1078 (comment)
  • Loading branch information
Marian Lingsch-Rosenfeld authored and Marian Lingsch-Rosenfeld committed Oct 24, 2024
1 parent 4f18b79 commit 43888c1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions benchexec/tools/cpachecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,11 @@ def option_present(option):
task.input_files_or_empty,
)
)
assert (
len(possible_witness_files) == 1
), f"Expected exactly one witness file, but found {len(possible_witness_files)}: {possible_witness_files}"
if len(possible_witness_files) != 1:
raise benchexec.tools.template.UnsupportedFeatureException(
f"Expected exactly one witness file, but found {len(possible_witness_files)}: {possible_witness_files}"
)

options += [f"{prefix}witness", possible_witness_files[0]]
else:
raise benchexec.tools.template.UnsupportedFeatureException(
Expand Down

0 comments on commit 43888c1

Please sign in to comment.