incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [1/5] git commit: [#5995] provide more info when macros error
Date Fri, 22 Mar 2013 13:58:25 GMT
Updated Branches:
  refs/heads/master 631319bac -> 0de02f8d6


[#5995] provide more info when macros error


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/5a8edf2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/5a8edf2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/5a8edf2a

Branch: refs/heads/master
Commit: 5a8edf2aa464ac871a425db328c7a1498a8ef817
Parents: b849642
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Wed Mar 20 15:45:52 2013 -0700
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Wed Mar 20 15:45:52 2013 -0700

----------------------------------------------------------------------
 Allura/allura/lib/macro.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5a8edf2a/Allura/allura/lib/macro.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/macro.py b/Allura/allura/lib/macro.py
index 7277a36..d60a510 100644
--- a/Allura/allura/lib/macro.py
+++ b/Allura/allura/lib/macro.py
@@ -3,6 +3,7 @@ import random
 import shlex
 import string
 import logging
+import traceback
 
 import pymongo
 from pylons import tmpl_context as c, app_globals as g
@@ -44,8 +45,10 @@ class parse(object):
                 response = macro(**h.encode_keys(args))
                 return response
             except (ValueError, TypeError) as ex:
+                log.warn('macro error.  Upwards stack is %s',
+                         ''.join(traceback.format_stack()),
+                         exc_info=True)
                 msg = cgi.escape(u'[[%s]] (%s)' % (s, repr(ex)))
-                log.warn('macro error', exc_info=True)
                 return '\n<div class="error"><pre><code>%s</code></pre></div>'
% msg
         except Exception, ex:
             raise


Mime
View raw message