changeset 2961:fa3e3d441dce

Creole parser: show error string when macro raises an exception, get rid of RedirectedOutput when calling other parsers
author Radomir Dopieralski <moindev@sheep.art.pl>
date Thu, 13 Dec 2007 11:22:16 +0100
parents b9d8366bb31e
children 5175bd01d5d8
files MoinMoin/parser/text_creole.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_creole.py	Thu Dec 13 10:37:17 2007 +0100
+++ b/MoinMoin/parser/text_creole.py	Thu Dec 13 11:22:16 2007 +0100
@@ -382,8 +382,9 @@
         args = node.args
         try:
             return self.formatter.macro(self.macro, macro_name, args)
-        except:
-            return self.formatter.text(self.request.getText('macro error'))
+        except Exception, err:
+            raise
+            return self.formatter.text(self.request.getText('macro error') + ' ' + str(err))
 
 # Not used
 #    def section_emit(self, node):
@@ -409,8 +410,7 @@
         parser_name = getattr(node, 'sect', '')
         if parser_name:
             try:
-                return self.request.redirectedOutput(
-                    self.formatter.parser, parser_name, node.content.split('\n'))
+                return self.formatter.parser(parser_name, node.content.split('\n'))
             except wikiutil.PluginMissingError:
                 pass
         return ''.join([