Forum und email

satellite_caught_exception

(PHP 4 >= 4.0.3)

satellite_caught_exception — 例外が前の関数からキャッチされたかどうかを調べる

説明

bool satellite_caught_exception ( void )

この関数は、例外がキャッチされた場合にTRUEを返します。

Example#1 IDLファイルのサンプル

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

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

Example#2 CORBA例外を処理するPHPコード

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