From a2bd42c71f1a29cb7829f8a61fedf383dc412392 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Fri, 19 Jul 2013 11:46:34 +0200 Subject: [PATCH] [SoapBundle] Used `BeSimple\SoapServer\Exception\ReceiverSoapFault` instead of `SoapFault` --- .../SoapBundle/Controller/SoapWebServiceController.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/BeSimple/SoapBundle/Controller/SoapWebServiceController.php b/src/BeSimple/SoapBundle/Controller/SoapWebServiceController.php index c2d7c1c..58fda7d 100644 --- a/src/BeSimple/SoapBundle/Controller/SoapWebServiceController.php +++ b/src/BeSimple/SoapBundle/Controller/SoapWebServiceController.php @@ -14,6 +14,7 @@ namespace BeSimple\SoapBundle\Controller; use BeSimple\SoapBundle\Soap\SoapRequest; use BeSimple\SoapBundle\Soap\SoapResponse; +use BeSimple\SoapServer\Exception as SoapException; use Symfony\Component\DependencyInjection\ContainerAware; use Symfony\Component\HttpFoundation\Response; @@ -126,11 +127,7 @@ class SoapWebServiceController extends ContainerAware } catch (\Exception $e) { $this->soapResponse = new Response(null, 500); - if ($e instanceof \SoapFault || $this->container->getParameter('kernel.debug')) { - throw $e; - } - - throw new \SoapFault('Receiver', $e->getMessage()); + throw $e instanceof \SoapFault || $this->container->getParameter('kernel.debug') ? $e : new SoapException\ReceiverSoapFault($e->getMessage()); } $this->setResponse($response);