MCPcopy Create free account
hub / github.com/Comfy-Org/ComfyUI / handle_execution_error

Method handle_execution_error

execution.py:682–708  ·  view source on GitHub ↗
(self, prompt_id, prompt, current_outputs, executed, error, ex)

Source from the content-addressed store, hash-verified

680 self.server.send_sync(event, data, self.server.client_id)
681
682 def handle_execution_error(self, prompt_id, prompt, current_outputs, executed, error, ex):
683 node_id = error["node_id"]
684 class_type = prompt[node_id]["class_type"]
685
686 # First, send back the status to the frontend depending
687 # on the exception type
688 if isinstance(ex, comfy.model_management.InterruptProcessingException):
689 mes = {
690 "prompt_id": prompt_id,
691 "node_id": node_id,
692 "node_type": class_type,
693 "executed": list(executed),
694 }
695 self.add_message("execution_interrupted", mes, broadcast=True)
696 else:
697 mes = {
698 "prompt_id": prompt_id,
699 "node_id": node_id,
700 "node_type": class_type,
701 "executed": list(executed),
702 "exception_message": error["exception_message"],
703 "exception_type": error["exception_type"],
704 "traceback": error["traceback"],
705 "current_inputs": error["current_inputs"],
706 "current_outputs": list(current_outputs),
707 }
708 self.add_message("execution_error", mes, broadcast=False)
709
710 def _notify_prompt_lifecycle(self, event: str, prompt_id: str):
711 if not _has_cache_providers():

Callers 1

execute_asyncMethod · 0.95

Calls 1

add_messageMethod · 0.95

Tested by

no test coverage detected