From e6c52f0430bd63cf8f3a469d9c7edae94d3ad8fd Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Tue, 23 Apr 2024 15:19:20 +0200 Subject: [PATCH] Update publish error label and message - add log.error --- client/ayon_core/hosts/houdini/api/lib.py | 8 +++++--- .../hosts/houdini/plugins/publish/extract_mantra_ifd.py | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/client/ayon_core/hosts/houdini/api/lib.py b/client/ayon_core/hosts/houdini/api/lib.py index 1e4682d38e..1a7c51e90e 100644 --- a/client/ayon_core/hosts/houdini/api/lib.py +++ b/client/ayon_core/hosts/houdini/api/lib.py @@ -248,14 +248,16 @@ def render_rop(ropnode): # Render only this node # (do not render any of its dependencies) ignore_inputs=True) - except hou.Error: + except hou.Error as exc: # The hou.Error is not inherited from a Python Exception class, # so we explicitly capture the houdini error, otherwise pyblish # will remain hanging. import traceback traceback.print_exc() - raise KnownPublishError("'{}' failed to render!".format(ropnode.path()), - label="Render was interrupted or canceled.") + self.log.error("Exception: {}".format(exc)) + raise KnownPublishError("Render maybe interrupted. " + "Check Details tab for more info.", + label="Failed to render '{}'".format(ropnode.path())) def imprint(node, data, update=False): diff --git a/client/ayon_core/hosts/houdini/plugins/publish/extract_mantra_ifd.py b/client/ayon_core/hosts/houdini/plugins/publish/extract_mantra_ifd.py index 0860592827..1ddd983011 100644 --- a/client/ayon_core/hosts/houdini/plugins/publish/extract_mantra_ifd.py +++ b/client/ayon_core/hosts/houdini/plugins/publish/extract_mantra_ifd.py @@ -33,9 +33,11 @@ class ExtractMantraIFD(publish.Extractor): os.path.normpath(os.path.join(staging_dir, frame))) ] if missing_frames: - raise KnownPublishError("Failed to complete Mantra ifd extraction. ", - # "Missing output files: {}".format(missing_frames), - label="Render was interrupted or canceled.") + self.log.error("Missing output files: {}".format(missing_frames)) + raise KnownPublishError("Extraction was failed due to missing frames. " + "Check Details tab for more info.", + label="Failed to complete Mantra ifd extraction for '{}'." + .format(ropnode.path())) if "representations" not in instance.data: instance.data["representations"] = []