def _format_msg(self, msg, edata):
edata = edata if isinstance(edata, list) else [edata]<EOL>for fdict in edata:<EOL><INDENT>if "<STR_LIT>".format(token=fdict["<STR_LIT>"]) not in msg:<EOL><INDENT>raise RuntimeError(<EOL>"<STR_LIT>".format(<EOL>token=fdict["<STR_LIT>"]<EOL>)<EOL>)<EOL><DEDENT>msg = msg.replace(<EOL>"<STR_LIT>".format(token=fdict["<STR_LIT>"]), "<STR_LIT>"<EOL>).format(value=fdict["<STR_LIT:value>"])<EOL><DEDENT>return msg<EOL>
Substitute parameters in exception message.