Improve the message for errors in package recipes (#37589)
fixes #30355
This commit is contained in:
parent
297329f4b5
commit
8da29d1231
1 changed files with 3 additions and 0 deletions
|
@ -1240,6 +1240,9 @@ def get_pkg_class(self, pkg_name):
|
|||
module = importlib.import_module(fullname)
|
||||
except ImportError:
|
||||
raise UnknownPackageError(pkg_name)
|
||||
except Exception as e:
|
||||
msg = f"cannot load package '{pkg_name}' from the '{self.namespace}' repository: {e}"
|
||||
raise RepoError(msg) from e
|
||||
|
||||
cls = getattr(module, class_name)
|
||||
if not inspect.isclass(cls):
|
||||
|
|
Loading…
Reference in a new issue