Skip to content

Commit bfe8fb1

Browse files
committed
feat: output errors are verbose
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 8f4db6b commit bfe8fb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cyclonedx/output/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ def output_to_file(self, filename: str, allow_overwrite: bool = False) -> None:
9393
output_directory = os.path.dirname(output_filename)
9494

9595
if not os.access(output_directory, os.W_OK):
96-
raise PermissionError
96+
raise PermissionError(output_directory)
9797

9898
if os.path.exists(output_filename) and not allow_overwrite:
99-
raise FileExistsError
99+
raise FileExistsError(output_filename)
100100

101101
with open(output_filename, mode='wb') as f_out:
102102
f_out.write(self.output_as_string().encode('utf-8'))

0 commit comments

Comments
 (0)