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