From fcb5988c2478c6d0955fe1123719341467c8fcb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=BD=D0=B8=D0=BD=20=D0=9E=D0=BB=D0=B5=D0=B3?= =?UTF-8?q?=20=D0=92=D0=B0=D0=BB=D0=B5=D1=80=D1=8C=D0=B5=D0=B2=D0=B8=D1=87?= <65292437+D1-3105@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:15:36 +0300 Subject: [PATCH] Update execution.py --- execution.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/execution.py b/execution.py index 8fff8983956..a722869f7d1 100644 --- a/execution.py +++ b/execution.py @@ -496,8 +496,15 @@ def execute(self, prompt, prompt_id, extra_data={}, execute_outputs=[]): if error is not None: self.handle_execution_error(prompt_id, dynamic_prompt.original_prompt, current_outputs, executed, error, ex) break - - result, error, ex = execute(self.server, dynamic_prompt, self.caches, node_id, extra_data, executed, prompt_id, execution_list, pending_subgraph_results) + try: + result, error, ex = execute(self.server, dynamic_prompt, self.caches, node_id, extra_data, executed, prompt_id, execution_list, pending_subgraph_results) + except Exception as e: + typ, _, tb = sys.exc_info() + exception_type = full_type_name(typ) + logging.error(f"Unexpected error occurred, during nested error handling: {e}, please open an issue on github.") + logging.error(traceback.format_exc()) + self.add_message("execution_error", {"prompt_id": prompt_id}, broadcast=True) + break self.success = result != ExecutionResult.FAILURE if result == ExecutionResult.FAILURE: self.handle_execution_error(prompt_id, dynamic_prompt.original_prompt, current_outputs, executed, error, ex)