Include the error type for the OperationalException

This commit is contained in:
raphael 2021-11-06 10:50:38 -04:00 committed by GitHub
parent 76cf68deed
commit fd7e4743ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,9 @@ class IResolver:
if enum_failed:
return iter([None])
except Exception as e:
raise OperationalException(f"Error loading {module_path}: {e}") from e
raise OperationalException(
f"Error loading {module_path}: {e.__class__.__name__}{e}"
) from e
valid_objects_gen = (
(obj, inspect.getsource(module)) for