Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/12/2008, 08:44
Avatar de craftyman
craftyman
 
Fecha de Ingreso: julio-2008
Mensajes: 8
Antigüedad: 15 años, 9 meses
Puntos: 1
Respuesta: Exception en Controlador Zend Framework

Hola, escribo porque ya solucione el problema y queria compartir con ustedes el script, por si acaso alguien tiene la misma duda.

Código PHP:
$front Zend_Controller_Front::getInstance();

//registramos un plugin para la exception de errores
$front->registerPlugin(new Zend_Controller_Plugin_ErrorHandler(array(
    
'module'     => 'exceptions',
    
'controller' => 'error',
    
'action'     => 'index'
)));

$response $front->addModuleDirectory(self::getRoot()  . '/modules')
                ->
returnResponse(true)
                
//->throwExceptions(true)
                
->dispatch();
                

if(
$response->isException())
{
     
$exceptions $response->getException();
}
else
{            
    
$response->setHeader('Content-Type''text/html;'true);
    
$response->sendResponse();