8000 [5.8] Add support for reportable, renderable, and responsable exceptions by owenvoke · Pull Request #958 · laravel/lumen-framework · GitHub
[go: up one dir, main page]

Skip to content

[5.8] Add support for reportable, renderable, and responsable exceptions #958

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 8000 send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 28, 2019

Conversation

owenvoke
Copy link
Contributor

This adds support for using the report() and render() methods on exceptions which is in the documentation but not currently implemented in Lumen (as mentioned in #873).

This allows the exception handler class to check for an existing report or render method on the exception, mostly the same way as in Laravel's core handler (report and render).

It also adds support for exceptions that implement the Responsable contract.

However, I wasn't able to use the Router::toResponse($request, $response); call and the $container property doesn't exist on Lumen, so this implementation is closer to the older version of Laravel (5.5 I think?).

I would assume that this closes #873, however, they were using Lumen 5.7, so not sure.

@GrahamCampbell GrahamCampbell changed the title Add support for reportable, renderable, and responsable exceptions [5.8] Add support for reportable, renderable, and responsable exceptions Aug 28, 2019
@taylorotwell taylorotwell merged commit 5d1d1ba into laravel:5.8 Aug 28, 2019
@owenvoke owenvoke deleted the feature/exception-handler-methods branch August 28, 2019 21:35
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.

Reportable & Renderable Exceptions are not working
2 participants
0