~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/dispatch/__init__.py

Alter the crash handler to display a different message depending on whether
or not the crash could be logged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
228
228
 
229
229
    req.write("""</h1>
230
230
<p>An error has occured which is the fault of the IVLE developers or
231
 
administrators. Details have been logged for further examination.</p>
232
 
""")
 
231
administrators. """)
 
232
 
 
233
    if logfail:
 
234
        req.write("Please report this issue to the server administrators, "
 
235
                  "along with the following information.")
 
236
    else:
 
237
        req.write("Details have been logged for further examination.")
 
238
    req.write("</p>")
 
239
 
233
240
    if show_errors:
234
241
        if msg is not None:
235
242
            req.write("<p>%s</p>\n" % cgi.escape(msg))
238
245
        req.write("<h2>Debugging information</h2>")
239
246
 
240
247
        req.write("<pre>\n%s\n</pre>\n"%cgi.escape(tb))
241
 
        if logfail:
242
 
            req.write("<p>Warning: Could not open error log.</p>\n"
243
 
                %cgi.escape(logfile))
244
248
    req.write("</body></html>")