Should probably throw the exception immediately then

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 22 May 2013 15:01, Michaël Gallego <notifications@github.com> wrote:

> In src/ZfrRest/Mvc/Controller/AbstractRestfulController.php:
>
> > @@ -199,9 +195,17 @@ protected function validateData($inputFilterClass, array $data)
> >              return $data;
> >          }
> >
> > -        $inputFilterManager = $this->serviceLocator->get('InputFilterManager');
> > -        $inputFilter        = $inputFilterManager->get($inputFilterClass);
> > +        try {
> > +            $inputFilterManager = $this->serviceLocator->get('InputFilterManager');
> > +            $inputFilter        = $inputFilterManager->get($inputFilterClass);
> > +        } catch (ServiceManagerExceptionInterface $e) {
>
> What if $inputFilterClass is null ? Does it throw ServiceNotFound ?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/zf-fr/zfr-rest/pull/43/files#r4337536>
> .
>