[Controller] Any kind of exception are now re-thrown as SoapFault.
This commit is contained in:
parent
90903e8a1b
commit
5dc1c4f917
|
@ -123,12 +123,16 @@ class SoapWebServiceController extends ContainerAware
|
|||
// forward to controller
|
||||
try {
|
||||
$response = $this->container->get('http_kernel')->handle($this->soapRequest, HttpKernelInterface::SUB_REQUEST, false);
|
||||
} catch (\SoapFault $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->soapResponse = new Response(null, 500);
|
||||
|
||||
if ($this->container->getParameter('kernel.debug')) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
throw new \SoapFault('Receiver', $e->getMessage());
|
||||
}
|
||||
|
||||
$this->setResponse($response);
|
||||
|
||||
// add response soap headers to soap server
|
||||
|
|
Loading…
Reference in New Issue