def error_received(self, exception):
        """Datagram error callback."""
        if exception is None:
            pass
        else:
            import pprint
            pprint.pprint(exception)
            _LOGGER.error('Error received: %s', exception)