Project

General

Profile

« Previous | Next » 

Revision 827

xml_func.py: Highlight nodes that were commented out because of errors

View differences:

xml_func.py
4 4

  
5 5
import dates
6 6
import exc
7
import term
7 8
import xml_dom
8 9

  
9 10
class SyntaxException(exc.ExceptionWithCause):
......
99 100
        except SyntaxException, e:
100 101
            str_ = str(node)
101 102
            exc.add_msg(e, 'function:\n'+str_)
102
            xml_dom.replace(node, node.ownerDocument.createComment('\n'+str_))
103
            xml_dom.replace(node, node.ownerDocument.createComment(
104
                '\n'+term.emph_multiline(str_)))
103 105
            on_error(e)
104 106
        else: xml_dom.replace_with_text(node, value)

Also available in: Unified diff