class MessageBusError(Exception):
    def __init__(
        self,   # type: MessageBusError
        component,  # type: str
        token,      # type: int
        data,       # type: bytes
    ):
        self.component = component
        self.token = token
        self.data = data

    def __str__(self):
        return "Error sending message to {}. Response token: {}, response data: {}".format(
            self.component,
            self.token,
            self.data
        )

    def __repr__(self):
        return self.__str__()
