MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / _show_error

Method _show_error

src/commands/create_group_command.py:178–195  ·  view source on GitHub ↗

Show error message to user using QMessageBox.

(self, message: str)

Source from the content-addressed store, hash-verified

176
177
178 def _show_error(self, message: str):
179 """Show error message to user using QMessageBox."""
180 try:
181 from PySide6.QtWidgets import QMessageBox
182
183 # Try to get the main window as parent
184 parent = None
185 if hasattr(self.node_graph, 'views') and self.node_graph.views():
186 parent = self.node_graph.views()[0].window()
187
188 msg = QMessageBox(parent)
189 msg.setWindowTitle("Group Creation Error")
190 msg.setText(message)
191 msg.setIcon(QMessageBox.Critical)
192 msg.exec()
193 except Exception:
194 # Fallback to print if QMessageBox fails
195 print(f"Error: {message}")
196
197 def get_memory_usage(self) -> int:
198 """Estimate memory usage of this command."""

Callers 1

executeMethod · 0.95

Calls 2

windowMethod · 0.80
execMethod · 0.80

Tested by

no test coverage detected