Pass undiagnosed errors to the user unadulterated
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index 3e3c72f..98ad2e5 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -320,11 +320,11 @@
extension.extra_link_args += list(BuildExt.LINK_OPTIONS[compiler])
try:
build_ext.build_ext.build_extensions(self)
- except KeyboardInterrupt:
- raise
except Exception as error:
- support.diagnose_build_ext_error(self, error, traceback.format_exc())
- raise CommandError("Failed `build_ext` step.")
+ formatted_exception = traceback.format_exc()
+ support.diagnose_build_ext_error(self, error, formatted_exception)
+ raise CommandError(
+ "Failed `build_ext` step:\n{}".format(formatted_exception))
class Gather(setuptools.Command):