Skip to content

Commit ce0a15c

Browse files
committed
adding Exception to logs in plugin_manager
1 parent 50abf57 commit ce0a15c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

yasmin_editor/yasmin_editor/plugins_manager/plugin_manager.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,10 @@ def load_xml_state_machines_from_package(self, package_name: str) -> None:
177177
def load_cpp_plugin(self, class_name: str) -> None:
178178
try:
179179
plugin_info: PluginInfo = PluginInfo(plugin_type="cpp", class_name=class_name)
180-
except Exception:
181-
yasmin.YASMIN_LOG_ERROR(f"Failed to load C++ plugin: {class_name}")
180+
except Exception as e:
181+
yasmin.YASMIN_LOG_ERROR(
182+
f'Failed to load C++ plugin: {class_name}. Error: "{e}"'
183+
)
182184
return
183185
self.cpp_plugins.append(plugin_info)
184186

@@ -187,9 +189,9 @@ def load_python_plugin(self, module: str, class_name: str) -> None:
187189
plugin_info: PluginInfo = PluginInfo(
188190
plugin_type="python", class_name=class_name, module=module
189191
)
190-
except Exception:
192+
except Exception as e:
191193
yasmin.YASMIN_LOG_ERROR(
192-
f"Failed to load Python plugin: {class_name} from module {module}"
194+
f'Failed to load Python plugin: {class_name} from module {module}. Error: "{e}"'
193195
)
194196
return
195197
self.python_plugins.append(plugin_info)

0 commit comments

Comments
 (0)