Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/02/2010, 11:26
Avatar de jackson666
jackson666
 
Fecha de Ingreso: noviembre-2009
Ubicación: Buenos Aires, Argentina
Mensajes: 1.971
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: throw new Exception

Código PHP:
<?php

$a 
"hola";

try{
    
    if(
$a == 1){
        echo 
"WTF???";
    }else{
        throw new 
Exception('Funcaaaa!!!');
    }
    
}catch(
Exception $e){
    echo 
$e->getMessage();
}

?>
__________________
HV Studio
Diseño y desarrollo web