Raise exception when an uncaught error is raised
StrategyResolver.load_strategy would fail if any error outside of (ModuleNotFoundError, SyntaxError, ImportError, NameError) is thrown. This change makes it raise an OperationalException when that happens. This will potentially be beneficial to people who use StrategyResolver.load_strategy outside of the FT directories.
This commit is contained in:
parent
d99eaccb5a
commit
76cf68deed
@ -69,6 +69,8 @@ class IResolver:
|
||||
logger.warning(f"Could not import {module_path} due to '{err}'")
|
||||
if enum_failed:
|
||||
return iter([None])
|
||||
except Exception as e:
|
||||
raise OperationalException(f"Error loading {module_path}: {e}") from e
|
||||
|
||||
valid_objects_gen = (
|
||||
(obj, inspect.getsource(module)) for
|
||||
|
Loading…
Reference in New Issue
Block a user