Skip to content

exceptions

ApplicationExecutableNotFound

Bases: Exception

Defined executable paths are not available on the machine.

Source code in client/ayon_applications/exceptions.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class ApplicationExecutableNotFound(Exception):
    """Defined executable paths are not available on the machine."""

    def __init__(self, application):
        self.application = application
        details = None
        if not application.executables:
            msg = (
                "Executable paths for application \"{}\"({}) are not set."
            )
        else:
            msg = (
                "Defined executable paths for application \"{}\"({})"
                " are not available on this machine."
            )
            details = "Defined paths:"
            for executable in application.executables:
                details += "\n- " + executable.executable_path

        self.msg = msg.format(application.full_label, application.full_name)
        self.details = details

        exc_mgs = str(self.msg)
        if details:
            # Is good idea to pass new line symbol to exception message?
            exc_mgs += "\n\n" + details
        self.exc_msg = exc_mgs
        super().__init__(exc_mgs)

ApplicationLaunchFailed

Bases: Exception

Application launch failed due to known reason.

Message should be self explanatory as traceback won't be shown.

Source code in client/ayon_applications/exceptions.py
41
42
43
44
45
46
class ApplicationLaunchFailed(Exception):
    """Application launch failed due to known reason.

    Message should be self explanatory as traceback won't be shown.
    """
    pass

ApplicationNotFound

Bases: Exception

Application was not found in ApplicationManager by name.

Source code in client/ayon_applications/exceptions.py
1
2
3
4
5
6
7
8
class ApplicationNotFound(Exception):
    """Application was not found in ApplicationManager by name."""

    def __init__(self, app_name):
        self.app_name = app_name
        super().__init__(
            "Application \"{}\" was not found.".format(app_name)
        )