Commit a2918d4
committed
fix: cgitb crashes if there is no line number set.
I am not sure why:
context.position[0]
is None when an exception happens while processing templates. This
causes a second exception because of a print statement matching %d to
None. The second exception blows away any chance at getting useful
info. So fix it by passing line number -1. Hopefully people will
recognize that as bogus and interpret it as no line number was
available.
Fixing the underlying cause (in ZopeTAL???) would be better though.1 parent a8a2610 commit a2918d4
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments