Ver Mensaje Individual
  #6 (permalink)  
Antiguo 17/04/2012, 12:18
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años, 8 meses
Puntos: 2135
Respuesta: llamar instancia dentro de un try cath

Código PHP:
Ver original
  1. function __autoload($name) {
  2.     echo "Want to load $name.\n";
  3.     throw new Exception("Unable to load $name.");
  4. }
  5.  
  6. try {
  7.     $obj = new NonLoadableClass();
  8. } catch (Exception $e) {
  9.     echo $e->getMessage(), "\n";
  10. }

Saludos.