Source code for vdat.command_interpreter.exceptions
"""Command interpreter exceptions"""
[docs]class CIError(Exception):
"""Generic exception. It's the parent of all the other exceptions defined
here"""
pass
[docs]class CIValidationError(CIError):
"""Exception raised when validating the command in the constructor"""
pass
[docs]class CINoExeError(CIValidationError):
"""Raised when the executable ``name`` is not found"""
def __init__(self, name):
msg = "The executable '{}' has not been found in the system path"
super(CINoExeError, self).__init__(msg.format(name))
[docs]class CIParseError(CIValidationError):
"""Failed parsing of the command"""
pass
[docs]class CIKeywordValidationError(CIValidationError):
"""Raised when the keyword validation fails"""
pass
[docs]class CIKeywordTypeError(CIKeywordValidationError):
"""Raised when the keyword doesn't have a ``type`` key or it's type is not
known"""
pass
[docs]class CIRunError(CIError):
"""Raised when running the command"""
pass
[docs]class CIPrimaryError(CIRunError):
"""Raised if something bad happens when handling a primary keyword"""
pass
[docs]class CIKeywordError(CIRunError):
"""Raised if something bad happens when handling a secondary keyword"""
pass
[docs]class CICommandFmtError(CIRunError):
"""Raised when the replacement of the keyword fails"""
pass