【发布时间】:2016-01-03 12:08:52
【问题描述】:
我无法在我的 PHP try catch 块中捕获 SoapFault 异常。我的代码也用完了等待服务器响应的 max_execution_time(120 秒)。
我看到了消息
警告:未捕获的 SoapFault 异常:[HTTP] D:\wamp\www\dev6\application\libraries\Search.php:161 中的错误网关 ...
我的代码,
try {
$oClient = new SoapClient( $this->CI->config->item('indexing_wsdl_url'),
array(
"trace" => true,
"exceptions" => true,
)
);
$result = $oClient->add(
array(
// Application specific parameters goes here
)
);// (this is line number 161 as seen in the warning)
} catch (SoapFault $fault) {
log_message('error', $fault->getMessage());
}
我正在使用 Codeigniter 3.0 框架,这个特定的代码位于一个库中。
这可能是什么问题?
问候
【问题讨论】:
-
你是否偶然使用了命名空间?
-
不,我没有使用命名空间。
标签: php soap exception-handling try-catch soap-client