From e99058a314691c12b3d82692ecbc82b540839282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wesley=20Berr=C3=AAdo?= Date: Mon, 1 Dec 2014 12:58:45 -0400 Subject: [PATCH] Permit show delete message. --- .../Resources/skeleton/rest/actions/delete.php.twig | 2 +- .../Resources/skeleton/rest/handler/delete.php.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Voryx/RESTGeneratorBundle/Resources/skeleton/rest/actions/delete.php.twig b/src/Voryx/RESTGeneratorBundle/Resources/skeleton/rest/actions/delete.php.twig index 37c4dce..05f3f83 100755 --- a/src/Voryx/RESTGeneratorBundle/Resources/skeleton/rest/actions/delete.php.twig +++ b/src/Voryx/RESTGeneratorBundle/Resources/skeleton/rest/actions/delete.php.twig @@ -35,7 +35,7 @@ try { return $this->container->get('{{ bundle|replace({'Bundle': ''})|lower}}.{{ entity|lower }}.handler')->delete(${{ entity|lower }}); } catch (\Exception $exception) { - return $exception; + throw new \RuntimeException("Exclusion not allowed"); } {% endblock method_body %} {% block method_return '' %} diff --git a/src/Voryx/RESTGeneratorBundle/Resources/skeleton/rest/handler/delete.php.twig b/src/Voryx/RESTGeneratorBundle/Resources/skeleton/rest/handler/delete.php.twig index c5ead31..8824fc8 100644 --- a/src/Voryx/RESTGeneratorBundle/Resources/skeleton/rest/handler/delete.php.twig +++ b/src/Voryx/RESTGeneratorBundle/Resources/skeleton/rest/handler/delete.php.twig @@ -9,7 +9,7 @@ return null; } catch (\Exception $e) { - throw new \RuntimeException("Exclusion not allowed"); + throw new \RuntimeException(); } {% endblock method_body %} }