Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/02/2012, 08:29
Avatar de jotaincubus
jotaincubus
 
Fecha de Ingreso: mayo-2005
Ubicación: Medellin - Colombia
Mensajes: 1.797
Antigüedad: 19 años
Puntos: 394
Respuesta: Como habilitar try / catch en php?

Código PHP:
Ver original
  1. <?php
  2.      try {
  3.  
  4.            throw new Exception("Error en la consulta");    
  5.                  
  6.       } catch (Exception $e)  
  7.       {
  8.            echo $e;
  9.       }  
  10. ?>

La excepción es almacenada en la variable $e
__________________
Por que existe gente que no agradece después de que se le ha brindado tiempo y ayuda ???