Forum und email

satellite_caught_exception

(PHP 4 >= 4.0.3)

satellite_caught_exception — Vérifie si une exception a été attrapée de la fonction précédente

Description

bool satellite_caught_exception ( void )
Warning

Cette fonction est EXPERIMENTALE. Cela signifie que le comportement de cette fonction, son nom et, concrètement, TOUT ce qui est documenté ici peut changer dans un futur proche, SANS PREAVIS ! Soyez-en conscient, et utilisez cette fonction à vos risques et périls.

Valeurs de retour

Cette fonction retourne TRUE si une exception a été attrapée, FALSE autrement.

Exemples

Example#1 Fichier IDL d'Exemple

/* ++?????++ Out of Cheese Error. Redo From Start. */
exception OutOfCheeseError {
    int parameter;
}

interface AnotherInterface {
    void AskWhy() raises (OutOfCheeseError);
}

Example#2 Code PHP pour la gestion des exceptions CORBA

<?php
$obj 
= new OrbitObject ($ior);

$obj->AskWhy();

if (
satellite_caught_exception()) {
    if (
"IDL:OutOfCheeseError:1.0" == satellite_exception_id()) {
        
$exception satellite_exception_value();
        echo 
$exception->parameter;
    }
}
?>