From 271b02ece32a703ed89dcde84fbe7a0f55fc30b4 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 13 Aug 2021 11:43:15 +0200 Subject: [PATCH] added basic create error exception --- openpype/pipeline/create/__init__.py | 2 ++ openpype/pipeline/create/creator_plugins.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/openpype/pipeline/create/__init__.py b/openpype/pipeline/create/__init__.py index 981f4917a2..2f4e8ef5b9 100644 --- a/openpype/pipeline/create/__init__.py +++ b/openpype/pipeline/create/__init__.py @@ -1,4 +1,5 @@ from .creator_plugins import ( + CreatorError, BaseCreator, Creator, AutoCreator @@ -11,6 +12,7 @@ from .context import ( __all__ = ( + "CreatorError", "BaseCreator", "Creator", "AutoCreator", diff --git a/openpype/pipeline/create/creator_plugins.py b/openpype/pipeline/create/creator_plugins.py index a5c98e45df..d273f4cdb1 100644 --- a/openpype/pipeline/create/creator_plugins.py +++ b/openpype/pipeline/create/creator_plugins.py @@ -11,6 +11,16 @@ import six from openpype.lib import get_subset_name +class CreatorError(Exception): + """Should be raised when creator failed because of known issue. + + Message of error should be user readable. + """ + + def __init__(self, message): + super(CreatorError, self).__init__(message) + + @six.add_metaclass(ABCMeta) class BaseCreator: """Plugin that create and modify instance data before publishing process.