On 06.03.2011 02:31, Jordi Boggiano wrote:
> On 05.03.2011 16:21, Don Pinkster wrote:
>> Hello list,
>>
>> In order to test my controllers better I want to extend the
>> NotFoundHttpException to customized classes like ForumNotFoundException.
>>
>> I noticed that simply extending this class is not sufficient. After digging
>> I saw the following snippet in the ExceptionController:
>>
>> switch ($exception->getClass()) {
>> case
>> 'Symfony\Component\Security\Core\Exception\AccessDeniedException':
>> return 403;
>> case
>> 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException':
>> return 404;
>> default:
>> return 500;
>>
>> Is there any reason why it isn't returning the $exception->getCode() (which
>> is used in NotFoundHttpException)? If not, Im happy to provide a patch for
>> this.
>
> I think you can send a pull request. IIRC the getCode() behavior was
> refactored at some point and probably that switch() predates the
> refactoring.
Missed Kris' answer, never mind :)
--
Jordi Boggiano
@seldaek :: http://seld.be/
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en