> - app developers should register views that match with a context that
>  equals the exception class itself, the default request type, and
>  the empty string as a view name.
> - when bfg encounters any exception when calling a view (or trying to
>  resolve a root factory, etc.. basically the scope handled currently
>  when it catches NotFound/Forbidden), it will do this:
>     exc_view = registry.adapters.lookup((req_iface, providedBy(exc)), IView,
>                name='')
>     if exc_view is not None:
>        response = exc_view(exc, request)
> The context of such an "exception view" will be the exception instance
> itself.  If you want a particular exception to be able to use a "real"
> context, you'll make it available as an attribute of the exception for use
> by the registered exception view (e.g. context.context or so).

Thanks, this is that I was talking about. Will try to implement.

Andrey Popp

phone: +7 911 740 24 91
e-mail: 8may...@gmail.com
Repoze-dev mailing list

Reply via email to