Try this.
Tell Zend Framework to not handle exceptions. Do this in your application.ini
resources.frontController.throwExceptions = 1
Do following in your Bootstrap class.
Define a custom method to handle exceptions.
public function __handleExceptions(Exception $e){
//render a view with a simple error message for the user
//and send an email with the error to admin
}
Override the _bootstrap() and run() methods of Zend_Application_Bootstrap_Bootstrap in your Bootstrap class and catch the exceptions thrown during the bootstrap process or while running the application and call your exception handler as shown below.
protected function _bootstrap($resource = null)
{
try {
parent::_bootstrap($resource);
} catch(Exception $e) {
$this->__handleExecptions($e);
}
}
public function run()
{
try {
parent::run();
} catch(Exception $e) {
$this->__handleExecptions($e);
}
}
This should handle all your exceptions. For handling errors register your own error handler as shown below.
public function _initErrorHandler(){
set_error_handler(array($this, '__hanleErrors'));
}
public function __hanleErrors($errNo, $errStr, $errFile, $errLine){
//render a view with a simple error message for the user
//and send an email with the error to admin
}
Now as you manually handle both errors and exceptions you can show user a simple message (by rendering a view) and email technical details to admin.
Hope this helps.