Skip to content

Commit cb9b380

Browse files
committed
Add better error
1 parent 69ddca9 commit cb9b380

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/semiwrap/makeplan.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ class ExtensionModule:
101101
install_path: pathlib.Path
102102

103103

104+
class PlanError(Exception):
105+
pass
106+
107+
104108
def _split_ns(name: str) -> T.Tuple[str, str]:
105109
ns = ""
106110
idx = name.rfind("::")
@@ -150,7 +154,10 @@ def generate(self):
150154
if extension.ignore:
151155
continue
152156

153-
yield from self._process_extension_module(package_name, extension)
157+
try:
158+
yield from self._process_extension_module(package_name, extension)
159+
except Exception as e:
160+
raise PlanError(f"{package_name} failed") from e
154161

155162
# TODO: this conditional probably should be done in the build system instead
156163
# cannot build pyi files when cross-compiling

0 commit comments

Comments
 (0)