(PHP 4 >= 4.0.3)
satellite_caught_exception --
Überprüfung, ob die vorhergehende Funktion eine Exception ausgelöst hat
Beschreibung
bool
satellite_caught_exception
()
Warnung |
This function is EXPERIMENTAL. That means, that the behaviour of this function, this function name, in concreto ANYTHING documented here can change in a future release of PHP WITHOUT NOTICE. Be warned, and use this function at your own risk. |
Diese Funktion gibt TRUE zurück, wenn eine Exception abgefangen
wurde.
Beispiel 1. IDL Beispieldatei
/* ++?????++ Out of Cheese Error. Redo From Start. */
exception OutOfCheeseError {
int parameter;
}
interface AnotherInterface {
void AskWhy() raises (OutOfCheeseError);
}
|
|
Beispiel 2. PHP Code zur Behandlung von CORBA Exceptions
<?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;
}
}
?>
|
|