# Path: typepy/error.py
# class TypeConversionError(TypeError):
#     """
#     Exception raised when failed to convert data.
#     """


import abc
from ..error import TypeConversionError
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""




class ValueConverterInterface(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def force_convert(self):  # pragma: no cover
        pass


class AbstractValueConverter(ValueConverterInterface):
    __slots__ = "_value"

    def __init__(self, value, params):
        self._value = value
        self._params = params

    def __repr__(self):
        try:
            string = str(self.force_convert())

# Path: typepy/error.py
# class TypeConversionError(TypeError):
#     """
#     Exception raised when failed to convert data.
#     """


# Path: typepy/converter/_interface.py
import abc
from ..error import TypeConversionError

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




class ValueConverterInterface(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def force_convert(self):  # pragma: no cover
        pass


class AbstractValueConverter(ValueConverterInterface):
    __slots__ = "_value"

    def __init__(self, value, params):
        self._value = value
        self._params = params

    def __repr__(self):
        try:
            string = str(self.force_convert())

        except TypeConversionError: