# encoding: utf-8

"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""

from __future__ import absolute_import, unicode_literals


class CommandError(Exception):
    @property
    def errno(self):
        return self.__errno

    def __init__(self, *args, **kwargs):
        self.__errno = kwargs.pop("errno", None)

        super(CommandError, self).__init__(*args, **kwargs)


class InvalidCommandError(CommandError):
    # Deprecate in the future
    pass


class CommandNotFoundError(CommandError):
    # Deprecate in the future
    pass

@@ -175,16 +175,76 @@
 ption):%0A
+    @property%0A    def cmd(self):%0A        return self.__cmd%0A%0A
     @pro
@@ -340,16 +340,61 @@
 wargs):%0A
+        self.__cmd = kwargs.pop(%22cmd%22, None)%0A
         

Add a property to an exception class