I have a timing/configuration issue, and any pointers would be welcome.
The problem: how to handle configuration/system errors by fallback to an
error page.
* I am using Catalyst authentication, but sometimes the database used
for session storage cannot be connected. Under these circumstances, I
want an error page which can be used to display an error suitable for a
system administrator
* The application starts fine, because it does not attempt to connect
initially
* When a request starts, the session system fails during the prepare
stage - calling stuff in Catalyst::Plugin::Session::Store::Delegate, and
usually get_session_data
* The application never gets to finalize, so nothing is ever sent to the
engine - this is the logic in handle_request
Where and how is it best to handle this?
I could do some of this before the first request, and I considered
hacking which controllers were active since I can do that during the
setup stage, but this is probably too late, since by then all the
plugins are set up, and this is where the session management is set.
Alternatively, I could do some work during the request cycle, but it is
not obvious where in the cycle you got to, which makes it hard to decide
whether you can generate an error.
I could just be missing some documentation: maybe this is covered but I
haven't been able to find it.
--S
--
Stuart Watt
ARM Product Developer
Information Balance
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/