When there's no DB connection, where to catch exceptions?

Let’s take the default tutorial example (About, Contact, Login + Countries).

Where is it better to catch exceptions when there is no db connection available?

Preferably with the ability to generate some views for such cases.