异常处理问题

浏览:3897 发布日期:2014/07/24 分类:求助交流
我在方法中,通过try...catch...来处理无法连接WebService接口时的异常,返回出错原因,代码如下:try{
    $client = new SoapClient("http://x.x.x.x/WebService.asmx?wsdl");
  }
 catch ( Exception $e ) { return $e->getMessage ();exit; }
只是最后返回的,仍然是ThinkPHP默认的错误页面,部分错误内容如下:[14-07-24 13:22:07] /var/www/html/app/ThinkPHP/Lib/Core/Think.class.php (277) halt(SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://x.x.x.x/WebService.asmx?wsdl' : failed to load external entity "http://x.x.x.x/WebService.asmx?wsdl" /var/www/html/app/Common/common.php 第 545 行.)
 [14-07-24 13:22:07] /var/www/html/app/ThinkPHP/Lib/Core/Think.class.php (292) Think::appError(1, SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://x.x.x.x/WebService.asmx?wsdl' : failed to load external entity "http://x.x.x.x/WebService1.asmx?wsdl", /var/www/html/app/Common/common.php, 545)
 [14-07-24 13:22:07]  () Think::fatalError()
请问是我的异常处理代码有问题吗?该如何解决这个问题。
最佳答案
评论( 相关
后面还有条评论,点击查看>>