Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/01/2009, 12:08
Avatar de jerkan
jerkan
 
Fecha de Ingreso: septiembre-2005
Mensajes: 1.607
Antigüedad: 18 años, 7 meses
Puntos: 19
Pregunta try require catch - zend framework

Hola, estaba mirándome el tutorial del zend framework y, al ver el código del try/catch del bootstrap.php, me he decidido a probarlo.

He intentado que saltara el catch así (poniendo una url incorrecta en el require):
Código PHP:
try {
    require 
'../application/bootstrap.ph';
} catch (
Exception $exception) {
    echo 
'<html><body><center>'
       
'An exception occured while bootstrapping the application.';
    if (
defined('APPLICATION_ENVIRONMENT') && APPLICATION_ENVIRONMENT != 'production') {
        echo 
'<br /><br />' $exception->getMessage() . '<br />'
           
'<div align="left">Stack Trace:' 
           
'<pre>' $exception->getTraceAsString() . '</pre></div>';
    }
    echo 
'</center></body></html>';
    exit(
1);

Yo esperaba que me saltara el código del catch pero me ha salido un warning y un fatal error en el require.

¿Qué se me escapa?