def error2str(self, e):
    if isinstance(e, exceptions.ValidationError):
        md = getattr(e, 'message_dict', None)
        if md is not None:
            def fieldlabel(name):
                de = self.get_data_elem(name)
                return force_text(getattr(de, 'verbose_name', name))
            return '\n'.join([
                "%s : %s" % (
                    fieldlabel(k), self.error2str(v))
                for k, v in list(md.items())])
        return '\n'.join(e.messages)
    return str(e)
Convert the given Exception object into a string, but handling
dataset/ETHPy150Open lsaffre/lino/lino/core/utils.py/error2str