Open domenkozar opened 11 years ago
Maybe as a start a friendly error message should be printed when no .mrbob config file exists (feels like mr.bob should check for this before passing stuff to jinja)?
Currently yields: jinja2.exceptions.UndefinedError: 'author' is undefined
Would you mind creating a pull request?
I'll give it a try tomorrow!
After having done further analyzing of the code and docs of both mr.bob and the template I was using (bobtemplates.kotti) my view at this has changed. I thought that the .mrbob config was required, I however noticed that it doesn't say that anywhere (and mr.bobs code treats it as optional). The fault of that error I got is the template, since it shouldn't assume the existence of something optional. Worth noting though is that in the docs of the template the author mentions that it requires the author vars so yeah, idk. Anyway, a more general solution to handling these errors is better, like your original idea. I don't feel I'm experienced enough to perform that task though.
OK, thanks for taking a look at this
When jinja2 fails (normally due to a refrenced undefined variables), provide a nice traceback.