add a base class to represent execution errors

This commit is contained in:
Russell Haering 2014-01-05 21:46:10 -08:00
parent a44af2d5b7
commit c7ab354f20

@ -17,6 +17,16 @@ limitations under the License.
from teeth_rest import errors
class CommandExecutionError(errors.RESTError):
"""Error raised when a command fails to execute."""
message = 'Command execution failed'
def __init__(self, details):
super(CommandExecutionError, self).__init__()
self.details = details
class InvalidCommandError(errors.InvalidContentError):
"""Error which is raised when an unknown command is issued."""