diff CHANGES.txt @ 7808:6c5f8da9fca7

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.
author John Rouillard <rouilj@ieee.org>
date Wed, 13 Mar 2024 18:25:59 -0400
parents 4fc89509ce78
children be6cb2e0d471
line wrap: on
line diff
--- a/CHANGES.txt	Wed Mar 13 18:16:51 2024 -0400
+++ b/CHANGES.txt	Wed Mar 13 18:25:59 2024 -0400
@@ -100,6 +100,11 @@
   request.client.additional_headers) to application/json and return
   json from the template. This json could access the 1i18n functions
   for a javascript helper. (John Rouillard)
+- when template processing raises an exception the line number is
+  sometimes missing. This causes cgitb to raise a second exception
+  which clobbers the info about the template issue. As a stop-gap set
+  the line number to -1 so the original traceback can be seen. This
+  could be a bug in ZopeTAL. (John Rouillard)
 
 Features:
 

Roundup Issue Tracker: http://roundup-tracker.org/