error message appears in ftrack whene executable was not found

This commit is contained in:
iLLiCiTiT 2020-11-19 11:52:50 +01:00
parent f27179d4ad
commit 6d9d7235a2
2 changed files with 10 additions and 1 deletions

View file

@ -60,6 +60,7 @@ class ApplictionExecutableNotFound(Exception):
if details:
# Is good idea to pass new line symbol to exception message?
exc_mgs += "\n" + details
self.exc_msg = exc_mgs
super(ApplictionExecutableNotFound, self).__init__(exc_mgs)

View file

@ -5,7 +5,8 @@ from pype.api import config
from pype.modules.ftrack.lib import BaseAction
from pype.lib import (
ApplicationManager,
ApplicationLaunchFailed
ApplicationLaunchFailed,
ApplictionExecutableNotFound
)
from avalon.api import AvalonMongoDB
@ -180,6 +181,13 @@ class AppplicationsAction(BaseAction):
task_name=task_name
)
except ApplictionExecutableNotFound as exc:
self.log.warning(exc.exc_msg)
return {
"success": False,
"message": exc.message
}
except ApplicationLaunchFailed as exc:
self.log.error(str(exc))
return {