satellite_caught_exception
(PHP 4 >= 4.0.3)
satellite_caught_exception — See if an exception was caught from the previous function
Description
bool satellite_caught_exception
( void
)
Warning
這個函數是實驗性質的。這個函數的行為、名稱、和關於此函數的任何其他文件在未來PHP的發行中可能會在不通知的情況下改變。 使用此延伸需自行承擔風險。
Return Values
This function returns TRUE if an exception has been caught, FALSE otherwise.
範例
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;
}
}
?>