Forum und email

satellite_caught_exception

(PHP 4 >= 4.0.3)

satellite_caught_exception — See if an exception was caught from the previous function

Descrizione

bool satellite_caught_exception ( void )
Avviso

Questa funzione è SPERIMENTALE. Ovvero, il comportamento di questa funzione, il nome di questa funzione, in definitiva tutto ciò che è documentato qui può cambiare nei futuri rilasci del PHP senza preavviso. Siete avvisati, l'uso di questa funzione è a vostro rischio.

Valori restituiti

This function returns TRUE if an exception has been caught, FALSE otherwise.

Esempi

Example#1 Sample IDL file

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

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

Example#2 PHP code for handling 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;
    }
}
?>