Mercurial > piecrust2
diff piecrust/chefutil.py @ 39:2f717f961996
Better error reporting and cache validation.
Fix the processor pipeline in the preview server.
Move the `pages` route to first position.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 21 Aug 2014 22:28:22 -0700 |
parents | f485ba500df3 |
children | 8703be118430 |
line wrap: on
line diff
--- a/piecrust/chefutil.py Thu Aug 21 10:56:17 2014 -0700 +++ b/piecrust/chefutil.py Thu Aug 21 22:28:22 2014 -0700 @@ -9,3 +9,11 @@ return '[%s%s%s] %s' % (Fore.GREEN, time_str, Fore.RESET, message) return '[%s] %s' % (time_str, message) + +def log_friendly_exception(logger, ex): + indent = '' + while ex: + logger.error('%s%s' % (indent, str(ex))) + indent += ' ' + ex = ex.__cause__ +