better loader error handling

This commit is contained in:
Ondrej Samohel 2021-08-11 22:06:44 +02:00
parent c5cf15aca7
commit e3116b0bd0
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
11 changed files with 24 additions and 11 deletions

View file

@ -1,6 +1,19 @@
# -*- coding: utf-8 -*-
"""Houdini specific Avalon/Pyblish plugin definitions."""
import sys
from avalon import houdini
import hou
import six
from openpype.api import PypeCreatorMixin
class Creator(PypeCreatorMixin, houdini.Creator):
pass
def process(self):
# reraise as standard Python exception so
# Avalon can catch it
try:
self._process()
except hou.Error as er:
six.reraise(Exception, er, sys.exc_info()[2])