aboutsummaryrefslogtreecommitdiffstats
path: root/bsie/utils/loading.py
diff options
context:
space:
mode:
Diffstat (limited to 'bsie/utils/loading.py')
-rw-r--r--bsie/utils/loading.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/bsie/utils/loading.py b/bsie/utils/loading.py
index eb05c35..58202d1 100644
--- a/bsie/utils/loading.py
+++ b/bsie/utils/loading.py
@@ -1,9 +1,4 @@
-"""
-Part of the bsie module.
-A copy of the license is provided with the project.
-Author: Matthias Baumgartner, 2022
-"""
# standard imports
import importlib
import typing
@@ -27,14 +22,14 @@ def safe_load(module_name: str, class_name: str):
module = importlib.import_module(module_name)
except Exception as err:
# cannot import module
- raise errors.LoaderError(f'cannot load module {module_name}') from err
+ raise errors.LoaderError(f'cannot load module {module_name} ({err})') from err
try:
# get the class from the module
cls = getattr(module, class_name)
except Exception as err:
# cannot find the class
- raise errors.LoaderError(f'cannot load class {class_name} from module {module_name}') from err
+ raise errors.LoaderError(f'cannot load class {class_name} from module {module_name} ({err})') from err
return cls