> * Better error reporting: the line causing the error is shown in the 
> exception traceback
a simple test:

code.py:
class Test:
    def GET(self):
        var = 'some text'
        return render.test(var)

test.html:
$def with (name)
$if 1 == True
    $name

traceback:
 Traceback (most recent call last):
   File "/usr/lib/python2.5/site-packages/web/application.py", line
205, in wsgi
     result = self.handle_with_processors()
   File "/usr/lib/python2.5/site-packages/web/application.py", line
177, in handle_with_processors
     return process(self.processors)
   File "/usr/lib/python2.5/site-packages/web/application.py", line
174, in process
     return self.handle()
   File "/usr/lib/python2.5/site-packages/web/application.py", line
166, in handle
     return self._delegate(fn, self.fvars, args)
   File "/usr/lib/python2.5/site-packages/web/application.py", line
342, in _delegate
     return handle_class(cls)
   File "/usr/lib/python2.5/site-packages/web/application.py", line
317, in handle_class
     return tocall(*args)
   File "/var/www/app/code.py", line 8, in GET
     return render.test(var)
   File "/usr/lib/python2.5/site-packages/web/template.py", line 827,
in __getattr__
     return self._template(name)
   File "/usr/lib/python2.5/site-packages/web/template.py", line 817,
in _template
     return self._load_template(name)
   File "/usr/lib/python2.5/site-packages/web/template.py", line 803,
in _load_template
     return Template(open(path).read(), filename=path,
**self._keywords)
   File "/usr/lib/python2.5/site-packages/web/template.py", line 736,
in __init__
     code = self.compile_template(text, filename)
   File "/usr/lib/python2.5/site-packages/web/template.py", line 758,
in compile_template
     rootnode = Parser(template_string, filename).parse()
   File "/usr/lib/python2.5/site-packages/web/template.py", line 76,
in parse
     suite = self.read_suite(text)
   File "/usr/lib/python2.5/site-packages/web/template.py", line 121,
in read_suite
     section, text = self.read_section(text)
   File "/usr/lib/python2.5/site-packages/web/template.py", line 105,
in read_section
     return self.read_block_section(text2, begin_indent)
   File "/usr/lib/python2.5/site-packages/web/template.py", line 374,
in read_block_section
     stmt, line = self.read_statement(line)
   File "/usr/lib/python2.5/site-packages/web/template.py", line 362,
in read_statement
     tok.consume_till(':')
   File "/usr/lib/python2.5/site-packages/web/template.py", line 420,
in consume_till
     raise ParseError, "Expected %s, found end of line." % repr(delim)
 ParseError: Expected ':', found end of line.

Where can I found the number of string in template, that causing
error. If my template will be >300 lines, it will be very hard..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to