satellite_caught_exception

(PHP 4 >= 4.0.3)

satellite_caught_exception --  Indique si une exception a été émise

Description

bool satellite_caught_exception ()

satellite_caught_exception() retourne TRUE si une exception a été émise lors du dernier appel à une fonction Orbit.

Exemple 1. Fichier IDL exemple : PlusDeFromage


<?php
/* ++?????++ Erreur PlusDeFromage. Recommence tout au début. */
exception PlusDeFromageErreur {
    int parameter;
}
interface UneAutreInterface {
    void AskWhy() raises (PlusDeFromage);
}
?>
      

Exemple 2. Code PHP pour gérer les exceptions CORBA


<?php
$obj = new OrbitObject ($ior);
$obj->AskWhy();
if (satellite_caught_exception()) {
    if ("IDL:PlusDeFromage:1.0" == satellite_exception_id()) {
        $exception = satellite_exception_value();
        echo $exception->parameter;
    }
}
?>