Substitute parameters in exception message.

def _format_msg(self, msg, edata):
        """Substitute parameters in exception message."""
        edata = edata if isinstance(edata, list) else [edata]
        for fdict in edata:
            if "*[{token}]*".format(token=fdict["field"]) not in msg:
                raise RuntimeError(
                    "Field {token} not in exception message".format(
                        token=fdict["field"]
                    )
                )
            msg = msg.replace(
                "*[{token}]*".format(token=fdict["field"]), "{value}"
            ).format(value=fdict["value"])
        return msg