def _get_contract_exception_dict(contract_msg):
<EOL>start_token = "<STR_LIT>"<EOL>stop_token = "<STR_LIT>"<EOL>if contract_msg.find(start_token) == -<NUM_LIT:1>:<EOL><INDENT>return {<EOL>"<STR_LIT>": <NUM_LIT:0>,<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT:type>": RuntimeError,<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>}<EOL><DEDENT>msg_start = contract_msg.find(start_token) + len(start_token)<EOL>contract_msg = contract_msg[msg_start:]<EOL>contract_name = contract_msg[: contract_msg.find("<STR_LIT:]>")]<EOL>contract_msg = contract_msg[<EOL>contract_msg.find("<STR_LIT:]>") + <NUM_LIT:1> : contract_msg.find(stop_token)<EOL>]<EOL>exdict = _CUSTOM_CONTRACTS[contract_name]<EOL>for exvalue in exdict.values():  <EOL><INDENT>if exvalue["<STR_LIT>"] == contract_msg:<EOL><INDENT>return exvalue<EOL><DEDENT><DEDENT>
Generate message for exception.