(Bug 5085) Stringify the error object from template toolkit

So that our own exception handling will know what to do with it.
Merge pull request #415 from afuna/scrutable-error-bug5085

(Bug 5085) Stringify the error object from template toolkit