Skip to content

Commit e31151d

Browse files
committed
Wrong Exception class was being imported
1 parent 8fdc038 commit e31151d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Serializer/JsonApiSerializer.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
1010
*/
11+
1112
namespace NilPortugues\Symfony\JsonApiBundle\Serializer;
1213

1314
use NilPortugues\Api\JsonApi\JsonApiTransformer;
1415
use NilPortugues\Api\Mapping\Mapping;
1516
use NilPortugues\Serializer\DeepCopySerializer;
1617
use ReflectionClass;
18+
use RuntimeException;
1719
use Symfony\Bundle\FrameworkBundle\Routing\Router;
18-
use Symfony\Component\Security\Acl\Exception\Exception;
20+
use Exception;
1921

2022
/**
2123
* Class JsonApiSerializer.
@@ -92,7 +94,7 @@ private function setUrlWithReflection(Router $router, Mapping $mapping, Reflecti
9294
*
9395
* @return mixed
9496
*
95-
* @throws \RuntimeException
97+
* @throws RuntimeException
9698
*/
9799
private function getUrlPattern(Router $router, $routeNameFromMappingFile)
98100
{
@@ -102,8 +104,8 @@ private function getUrlPattern(Router $router, $routeNameFromMappingFile)
102104
if (empty($route)) {
103105
throw new Exception();
104106
}
105-
} catch (\Exception $e) {
106-
throw new \RuntimeException(
107+
} catch (Exception $e) {
108+
throw new RuntimeException(
107109
\sprintf('Route \'%s\' has not been defined as a Symfony route.', $routeNameFromMappingFile)
108110
);
109111
}

0 commit comments

Comments
 (0)