Skip to content

Commit

Permalink
Wrong Exception class was being imported
Browse files Browse the repository at this point in the history
  • Loading branch information
nilportugues committed May 28, 2016
1 parent 8fdc038 commit e31151d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Serializer/JsonApiSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace NilPortugues\Symfony\JsonApiBundle\Serializer;

use NilPortugues\Api\JsonApi\JsonApiTransformer;
use NilPortugues\Api\Mapping\Mapping;
use NilPortugues\Serializer\DeepCopySerializer;
use ReflectionClass;
use RuntimeException;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\Security\Acl\Exception\Exception;
use Exception;

/**
* Class JsonApiSerializer.
Expand Down Expand Up @@ -92,7 +94,7 @@ private function setUrlWithReflection(Router $router, Mapping $mapping, Reflecti
*
* @return mixed
*
* @throws \RuntimeException
* @throws RuntimeException
*/
private function getUrlPattern(Router $router, $routeNameFromMappingFile)
{
Expand All @@ -102,8 +104,8 @@ private function getUrlPattern(Router $router, $routeNameFromMappingFile)
if (empty($route)) {
throw new Exception();
}
} catch (\Exception $e) {
throw new \RuntimeException(
} catch (Exception $e) {
throw new RuntimeException(
\sprintf('Route \'%s\' has not been defined as a Symfony route.', $routeNameFromMappingFile)
);
}
Expand Down

0 comments on commit e31151d

Please sign in to comment.