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 (
|
|
|
|
f"Command({self.cmd}), Status({self.returncode}):\n"
|
|
|
|
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
|