satellite_caught_exception

(PHP 4 >= 4.0.3)

satellite_caught_exception --  Visszaadja, hogy volt-e kivétel (exception) az előző függvényhívásban.

Leírás

bool satellite_caught_exception ()

Ez a függvény igazat ad vissza, ha kivétel történt.

Példa 1. Minta IDL fájl


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

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

      

Példa 2. PHP kód a CORBA kivételek kezelésére


<?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;
    }
}
?>