For early exceptions like that I usually echo a static error page if an
exception is thrown during bootstrapping:
try {
$application->bootstrap();
} catch (Exception $e) {
echo file_get_contents('static_error_page.html');
}
$application->run();
The problem with this is you lose any special error handling like logging,
but it wouldn't be too tough to create a simple logger instance and write to
it from this catch.
--
Hector
On Mon, Feb 8, 2010 at 3:56 PM, Alex Howansky <[email protected]>wrote:
>
> How do I catch an exception that gets thrown in one of my bootstrap's _init
> methods? I'd like to handle it via my standard error handler in the
> error/error action but it seems that's not possible since the exception
> fires before the request gets dispatched.
>