2019-09-28 07:29:15 +01:00
|
|
|
"""
|
|
|
|
Provides CORE specific errors.
|
|
|
|
"""
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
class CoreCommandError(subprocess.CalledProcessError):
|
|
|
|
"""
|
|
|
|
Used when encountering internal CORE command errors.
|
|
|
|
"""
|
|
|
|
|
2020-01-13 18:06:18 +00:00
|
|
|
def __str__(self) -> str:
|
2019-10-18 02:59:50 +01:00
|
|
|
return (
|
2022-03-04 17:55:40 +00:00
|
|
|
f"command({self.cmd}), status({self.returncode}):\n"
|
2019-10-18 02:59:50 +01:00
|
|
|
f"stdout: {self.output}\nstderr: {self.stderr}"
|
2019-10-10 23:25:12 +01:00
|
|
|
)
|
2019-09-28 07:29:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
class CoreError(Exception):
|
|
|
|
"""
|
|
|
|
Used for errors when dealing with CoreEmu and Sessions.
|
|
|
|
"""
|
|
|
|
|
|
|
|
pass
|
2020-04-15 19:44:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
class CoreXmlError(Exception):
|
|
|
|
"""
|
|
|
|
Used when there was an error parsing a CORE xml file.
|
|
|
|
"""
|
|
|
|
|
|
|
|
pass
|
2020-08-27 18:43:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
class CoreServiceError(Exception):
|
|
|
|
"""
|
|
|
|
Used when there is an error related to accessing a service.
|
|
|
|
"""
|
|
|
|
|
|
|
|
pass
|
2020-08-27 18:46:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
class CoreServiceBootError(Exception):
|
|
|
|
"""
|
|
|
|
Used when there is an error booting a service.
|
|
|
|
"""
|
|
|
|
|
|
|
|
pass
|
2021-03-31 19:13:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
class CoreConfigError(Exception):
|
|
|
|
"""
|
|
|
|
Used when there is an error defining a configurable option.
|
|
|
|
"""
|
|
|
|
|
|
|
|
pass
|