
class StratisCliError(Exception):
    """
    Top-level stratis cli error.
    """
    pass


class StratisCliValueError(StratisCliError):
    """ Raised when a parameter has an unacceptable value.

        May also be raised when the parameter has an unacceptable type.
    """
    _FMT_STR = "value '%s' for parameter %s is unacceptable"

    def __init__(self, value, param, msg=None):
        """ Initializer.

            :param object value: the value
            :param str param: the parameter
            :param str msg: an explanatory message
        """
        # pylint: disable=super-init-not-called
        self._value = value
        self._param = param
        self._msg = msg

    def __str__(self): # pragma: no cover
        if self._msg:
            fmt_str = self._FMT_STR + ": %s"
            return fmt_str % (self._value, self._param, self._msg)
        else:
            return self._FMT_STR % (self._value, self._param)


class StratisCliError(Exception):
    """
    Top-level stratis cli error.
    """
    pass


class StratisCliValueError(StratisCliError):
    """ Raised when a parameter has an unacceptable value.

        May also be raised when the parameter has an unacceptable type.
    """
    _FMT_STR = "value '%s' for parameter %s is unacceptable"

    def __init__(self, value, param, msg=None):
        """ Initializer.

            :param object value: the value
            :param str param: the parameter
            :param str msg: an explanatory message
        """
        # pylint: disable=super-init-not-called
        self._value = value
        self._param = param
        self._msg = msg

    def __str__(self): # pragma: no cover
        if self._msg:
            fmt_str = self._FMT_STR + ": %s"
            return fmt_str % (self._value, self._param, self._msg)
        else:
            return self._FMT_STR % (self._value, self._param)


class StratisCliValueUnimplementedError(StratisCliValueError):
    """
    Raised if a parameter is not intrinsically bad but functionality
    is unimplemented for this value.
    """
    pass

Add an exception useful for prototyping.
Add an exception useful for prototyping.

Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>

  
  class StratisCliError(Exception):
      """
      Top-level stratis cli error.
      """
      pass
  
  
  class StratisCliValueError(StratisCliError):
      """ Raised when a parameter has an unacceptable value.
  
          May also be raised when the parameter has an unacceptable type.
      """
      _FMT_STR = "value '%s' for parameter %s is unacceptable"
  
      def __init__(self, value, param, msg=None):
          """ Initializer.
  
              :param object value: the value
              :param str param: the parameter
              :param str msg: an explanatory message
          """
          # pylint: disable=super-init-not-called
          self._value = value
          self._param = param
          self._msg = msg
  
      def __str__(self): # pragma: no cover
          if self._msg:
              fmt_str = self._FMT_STR + ": %s"
              return fmt_str % (self._value, self._param, self._msg)
          else:
              return self._FMT_STR % (self._value, self._param)
  
+ 
+ class StratisCliValueUnimplementedError(StratisCliValueError):
+     """
+     Raised if a parameter is not intrinsically bad but functionality
+     is unimplemented for this value.
+     """
+     pass
+ 
Add an exception useful for prototyping.
## Code Before:

class StratisCliError(Exception):
    """
    Top-level stratis cli error.
    """
    pass


class StratisCliValueError(StratisCliError):
    """ Raised when a parameter has an unacceptable value.

        May also be raised when the parameter has an unacceptable type.
    """
    _FMT_STR = "value '%s' for parameter %s is unacceptable"

    def __init__(self, value, param, msg=None):
        """ Initializer.

            :param object value: the value
            :param str param: the parameter
            :param str msg: an explanatory message
        """
        # pylint: disable=super-init-not-called
        self._value = value
        self._param = param
        self._msg = msg

    def __str__(self): # pragma: no cover
        if self._msg:
            fmt_str = self._FMT_STR + ": %s"
            return fmt_str % (self._value, self._param, self._msg)
        else:
            return self._FMT_STR % (self._value, self._param)

## Instruction:
Add an exception useful for prototyping.
## Code After:

class StratisCliError(Exception):
    """
    Top-level stratis cli error.
    """
    pass


class StratisCliValueError(StratisCliError):
    """ Raised when a parameter has an unacceptable value.

        May also be raised when the parameter has an unacceptable type.
    """
    _FMT_STR = "value '%s' for parameter %s is unacceptable"

    def __init__(self, value, param, msg=None):
        """ Initializer.

            :param object value: the value
            :param str param: the parameter
            :param str msg: an explanatory message
        """
        # pylint: disable=super-init-not-called
        self._value = value
        self._param = param
        self._msg = msg

    def __str__(self): # pragma: no cover
        if self._msg:
            fmt_str = self._FMT_STR + ": %s"
            return fmt_str % (self._value, self._param, self._msg)
        else:
            return self._FMT_STR % (self._value, self._param)


class StratisCliValueUnimplementedError(StratisCliValueError):
    """
    Raised if a parameter is not intrinsically bad but functionality
    is unimplemented for this value.
    """
    pass
