doc: use `sprintf' in exceptions

refs #4820