Properly format errors/warnings.

STUD-1063

I stopped in the debugger and made sure that both strings are now properly formatted.

@dmitchell Please review (low priority).