-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/13/2014 05:59 PM, Ben Sizer wrote: > Thanks for your reply. > > I wouldn't know how to catch the exception any further upstream. I add > the routes (in this case mapping 'front_page' to '/'), call > make_wsgi_app, that gets run by paste/pserve (I assume), and it > invokes my view function (front_page) when I point a browser at the > site. That is defined as such: > > @view_config(route_name='front_page', renderer='front_page.mako') def > front_page(request): logged_in_user = request.authenticated_userid > > And if that first line throws (because authenticated_userid has never > been filled in), I never get a traceback.
I don't have my knowledge of the traceback handling swapped in, but I do know that if you expect an 'authenticated_userid', you need to protect the view with a permission: pyramid doesn't authenticate users in unprotected views. OTOH, in that case, the 'authenticated_userid' would be None (and not raise an error). What version of Pyramid are you running? The 'authenticated_userid' attribute was added to the request in 1.5a3. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 [email protected] Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSPE6IACgkQ+gerLs4ltQ6bKgCg2b7VOJxiJwDnFAUH86BqRQA0 EVIAn30ejR+C9kS7NzDAx7VVCfVN129m =wzlv -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
