Skip to content

[Coookbook] - EventListener exception method error #1849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

[Coookbook] - EventListener exception method error #1849

wants to merge 1 commit into from

Conversation

egulias
Copy link
Contributor

@egulias egulias commented Oct 26, 2012

\Exception does not have a "getCodeStatus" method, but a"getCode". Apart from that, this code is related to the exception not to the Response status code.
Therefore I've adapted the $message to have the exception code via getCode and added a 500 HTTP Status Code.

\Exception does not have a "getCodeStatus" method, but a"getCode". Apart from that, this code is related to the exception not to the Response status code.
Therefore I've adapted the $message to have the exception code via getCode and added a 500 HTTP Status Code.
@weaverryan
Copy link
Member

Hi Eduardo!

Yes, you're right! Actually, the intention here was to use the exception in this way - but only if it implements the HttpExceptionInterface. I've patched your commit into the 2.0 branch at sha: b35ca9a and then also added a check for HttpExceptionInterface.

Thanks!

@weaverryan weaverryan closed this Oct 27, 2012
@egulias
Copy link
Contributor Author

egulias commented Oct 28, 2012

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants