lundi 4 juillet 2011

PHP - Gestion des Exceptions

Gestion des exeptions

try {
    if(!@include('/path/to/file.php')) {
        throw new Exception('Failed to load blabla');
    }
}
catch(Exception $e) {
    print $e->getMessage();
}

Aucun commentaire:

Enregistrer un commentaire