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