Issue 1178148: cgitb.py report wrong line number (original) (raw)

Created on 2005-04-06 23:04 by barry-scott, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
exctest.cgi ping,2005-04-18 18:29 CGI script for testing an exception.
exctest.html barry-scott,2005-04-20 19:57
Messages (4)
msg24932 - (view) Author: Barry Alan Scott (barry-scott) * Date: 2005-04-06 23:04
Given code like try: raise 'bug' except ValueError: pass # cgitb.py think 'bug' is here cgitb.py will report that the exception 'bug' is at the pass line. This is a time waster until you figure that this problem exists.
msg24933 - (view) Author: Ka-Ping Yee (ping) * (Python committer) Date: 2005-04-18 18:29
Logged In: YES user_id=45338 Can't reproduce this problem. When i test the provided case, cgitb reports the error on the "raise" line as it should. See the attached file for my test case; cgitb highlights line 6 ("raise 'spam'").
msg24934 - (view) Author: Barry Alan Scott (barry-scott) * Date: 2005-04-20 19:57
Logged In: YES user_id=28665 I ran your example on Mac OS X 10.3.9 and its shipped Python 2.3 The attached exctest.html clear show the problem. Did this get fixed in 2.4?
msg24935 - (view) Author: Ka-Ping Yee (ping) * (Python committer) Date: 2005-11-08 05:21
Logged In: YES user_id=45338 I'm going to close this. I've tested it in Python 2.3.5, 2.4.1, and 2.5a0. It works correctly in every case, so it was probably fixed between 2.3 and 2.3.5.
History
Date User Action Args
2022-04-11 14:56:10 admin set github: 41820
2005-04-06 23:04:23 barry-scott create