[SoapBundle] Used `BeSimple\SoapServer\Exception\ReceiverSoapFault` instead of `SoapFault`

This commit is contained in:
Francis Besset 2013-07-19 11:46:34 +02:00
parent f9a351f9bf
commit a2bd42c71f
1 changed files with 2 additions and 5 deletions

View File

@ -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);