So will already handles this formatting and output - the better way is to raise an exception with the info you want, and let him handle output.

But more critically, this shouldn't be blowing up - the real bug is that it is.

Do we have an example of a template that goes boom?