Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/pyproject_hooks/_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ def __init__(
# Preserving arg order for the sake of API backward compatibility.
self.backend_name = backend_name
self.backend_path = backend_path
self.traceback = traceback
super().__init__(message or "Error while importing backend")
self.traceback = traceback or ""
super().__init__(
f"{message or 'Error while importing backend'}"
+ (f"\n\nTraceback:\n{self.traceback}" if self.traceback else "")
)


class HookMissing(Exception):
Expand Down