core-extra/daemon/core/errors.py
2019-10-17 18:59:50 -07:00

24 lines
479 B
Python

"""
Provides CORE specific errors.
"""
import subprocess
class CoreCommandError(subprocess.CalledProcessError):
"""
Used when encountering internal CORE command errors.
"""
def __str__(self):
return (
f"Command({self.cmd}), Status({self.returncode}):\n"
f"stdout: {self.output}\nstderr: {self.stderr}"
)
class CoreError(Exception):
"""
Used for errors when dealing with CoreEmu and Sessions.
"""
pass