Skip to content

Commit

Permalink
Improved error formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Oct 14, 2023
1 parent bf53e4e commit 59c850b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/py_build_cmake/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ def format_and_rethrow_exception(e):
elif isinstance(e, Exception):
logger.error("Uncaught exception:", exc_info=e)
msg = (
"\n" "\n" f"\t\u274C Uncaught exception: {type(e)}\n" "\n" f"\t\t{e}\n" "\n"
"\n"
"\n"
f"\t\u274C Uncaught exception: {type(e).__name__}\n"
"\n"
f"\t\t{e}\n"
"\n"
)
raise FormattedErrorMessage(msg) from e

0 comments on commit 59c850b

Please sign in to comment.