Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/02/2012, 08:23
Avatar de RIVERMILLOS
RIVERMILLOS
 
Fecha de Ingreso: marzo-2010
Mensajes: 1.336
Antigüedad: 14 años, 2 meses
Puntos: 15
Como habilitar try / catch en php?

hola quisiera saber si debo hacer algo en especial para habilitar try y catch pues tengo lo siguiente

Código PHP:

<?php
     
try {

           throw new 
Exception("Error en la consulta");   
                
      } catch (
Exception $e
      {
           echo 
"HOLA";
      }  
echo 
"aa";
?>
y no captura la Exception no entra en el catch me arroja el error directamente en pantalla , que puede ser?


saludos