Focus3D / crunchy

Automatically exported from code.google.com/p/crunchy
0 stars 0 forks source link

Colourizer test broken #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run the colourizer test (/src/test/colourizer.html)

What is the expected output? What do you see instead?
The page doesn't even load :-(

The terminal gives the following traceback:

Exception happened during processing of request from ('127.0.0.1', 3632)
Traceback (most recent call last):
  File "SocketServer.py", line 222, in handle_request
    self.process_request(request, client_address)
  File "SocketServer.py", line 241, in process_request
    self.finish_request(request, client_address)
  File "SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "SocketServer.py", line 521, in __init__
    self.handle()
  File "BaseHTTPServer.py", line 316, in handle
    self.handle_one_request()
  File "BaseHTTPServer.py", line 310, in handle_one_request
    method()
  File "/home/johan/workspace/crunchy-dev/src/crunchyrequest.py", line 47,
in do_GET
    page = crunchytute.VLAMPage(handle, 'file://' + path)
  File "/home/johan/workspace/crunchy-dev/src/crunchytute.py", line 57, in
__init__
    self.process_body()
  File "/home/johan/workspace/crunchy-dev/src/crunchytute.py", line 96, in
process_body
    self.process_pre(pre)
  File "/home/johan/workspace/crunchy-dev/src/crunchytute.py", line 178, in
process_pre
    self.substitute_editor(pre)
  File "/home/johan/workspace/crunchy-dev/src/crunchytute.py", line 217, in
substitute_editor
    elem.append(widgets.Editor(widgets.EXEC_BUTTON, text))
  File "/home/johan/workspace/crunchy-dev/src/widgets.py", line 79, in __init__
    elem.append(Code(text))
  File "/home/johan/workspace/crunchy-dev/src/widgets.py", line 116, in
__init__
    elem = parseListing(code)
  File "/home/johan/workspace/crunchy-dev/src/widgets.py", line 143, in
parseListing
    for tok in tokenize.generate_tokens(in_buf.readline):
  File "tokenize.py", line 236, in generate_tokens
    raise TokenError, ("EOF in multi-line statement", (lnum, 0))
TokenError: ('EOF in multi-line statement', (4, 0))

I think we just need to get error handling into this part of the system

Original issue reported on code.google.com by johannes...@gmail.com on 17 Dec 2006 at 3:21

GoogleCodeExporter commented 8 years ago
Started, just adding error-handling for now

Original comment by johannes...@gmail.com on 17 Dec 2006 at 7:41

GoogleCodeExporter commented 8 years ago
Semi-fixed, invalid code now falls back on default non-styled behavior.

This might be better than assaulting the unsuspecting user with an error 
message that
isn't their fault. Maybe we need a "developer" mode that warns the user about 
such
things and a "user" mode that doesn't.

Original comment by johannes...@gmail.com on 17 Dec 2006 at 10:14

GoogleCodeExporter commented 8 years ago
I suggest a very visible (say black text on orange background) error message to 
be
added at the top of the code section.  Code that can't be styled might have a 
syntax
error and, in any event, should be fixed by the tutorial writer.  The easier it 
is
for the tutorial writer to notice such problems, the more likely it will be 
fixed.

Original comment by andre.ro...@gmail.com on 17 Dec 2006 at 10:30

GoogleCodeExporter commented 8 years ago

Original comment by johannes...@gmail.com on 28 Jan 2007 at 3:18

GoogleCodeExporter commented 8 years ago
Marking as invalid because the changes that triggered this have been reverted.

Original comment by johannes...@gmail.com on 31 Jan 2007 at 12:15