Skip to content
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

[HttpKernel] Set previous exception when rethrown from controller resolver #35722

Merged

Conversation

danut007ro
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
License MIT

If an \InvalidArgumentException is catched by ControllerResolver a new one is thrown. The old exception is not added as previous parameter on the new one so it is not visible on the exception page. This pull request adds old exception as previous on the new one, so it is also visible on the exception page.

Thank you.

@fabpot fabpot changed the base branch from 4.4 to 3.4 February 15, 2020 07:21
@fabpot fabpot force-pushed the controller_invalid_argument_exception branch from ab06cd9 to 87d51c1 Compare February 15, 2020 07:21
@fabpot
Copy link
Member

fabpot commented Feb 15, 2020

Thank you @danut007ro.

fabpot added a commit that referenced this pull request Feb 15, 2020
…troller resolver (danut007ro)

This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.

Discussion
----------

[HttpKernel] Set previous exception when rethrown from controller resolver

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

If an `\InvalidArgumentException` is catched by ControllerResolver a new one is thrown. The old exception is not added as `previous` parameter on the new one so it is not visible on the exception page. This pull request adds old exception as previous on the new one, so it is also visible on the exception page.

Thank you.

Commits
-------

87d51c1 Set previous exception when rethrown from controller resolver
@fabpot fabpot merged commit 87d51c1 into symfony:3.4 Feb 15, 2020
This was referenced Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants