[更新]修改soap异常处理

This commit is contained in:
Anyon 2018-05-07 17:25:03 +08:00
parent 8c433686d5
commit 4d52dcfafa

View File

@ -50,6 +50,7 @@ class SoapService
* @param string $name SOAP调用方法名 * @param string $name SOAP调用方法名
* @param array|string $arguments SOAP调用参数 * @param array|string $arguments SOAP调用参数
* @return array|string|bool * @return array|string|bool
* @throws \think\Exception
*/ */
public function __call($name, $arguments) public function __call($name, $arguments)
{ {
@ -57,8 +58,8 @@ class SoapService
return $this->soap->__soapCall($name, $arguments); return $this->soap->__soapCall($name, $arguments);
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error("Soap Error. Call {$name} Method --- " . $e->getMessage()); Log::error("Soap Error. Call {$name} Method --- " . $e->getMessage());
throw new Exception($e->getMessage(), $e->getCode());
} }
return false;
} }
} }