code: def _format_msg(self, msg, edata):
          
          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
docs: Substitute parameters in exception message.