Print context when key fails to be formatted

Print the parameter dict when a template fails to format a dictionary
key.  This change also pretty prints the parameter dict for convenience.

Change-Id: Ib0918272126b5c04f713b2e9cd391aa2a36615c7
Merge "Print context when key fails to be formatted"