[Catalyst] Confused: how to handle system-level errors with
fallback pages
Stuart Watt
swatt at infobal.com
Mon Aug 30 20:12:38 GMT 2010
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100830/a9e48=
5d8/attachment.htm
More information about the Catalyst
mailing list