[albatross-users] albatross-1.11pre2 does not contain traceback.html

Andrew McNamara andrewm at object-craft.com.au
Wed Dec 10 00:28:07 EST 2003


>in app.py line 287 is:
>            templ = self.load_template('traceback.html')
>
>albatross-1.11pre2 does not contain traceback.html
>
>is this a bug or did i miss something?

That code is wrapped in a try: except: block - the intention is that
you can supply a "trackback.html" template to render the exception in a
site specific way, but if that fails (because the traceback template is
missing, or the traceback template itself has an error), a simple <pre>
traceback is generated instead:

        try:
            tmp_ctx = self.create_context()
            tmp_ctx.set_request(req)
            tmp_ctx.locals.python_exc = pyexc
            tmp_ctx.locals.html_exc = htmlexc
            templ = self.load_template('traceback.html')
            templ.to_html(tmp_ctx)
            tmp_ctx.flush_content()
        except:
            req.write_content('<pre>')
            req.write_content(htmlexc)
            req.write_content('\n\n')
            req.write_content(pyexc)
            req.write_content('</pre>')

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list