[Catalyst] Confused: how to handle system-level errors with
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 =
* 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 =
* The application starts fine, because it does not attempt to connect =
* When a request starts, the session system fails during the prepare =
stage - calling stuff in Catalyst::Plugin::Session::Store::Delegate, and =
* 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.
ARM Product Developer
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst