-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Proposal: Throwable responses #2012
Comments
Exceptions as control flow are generally considered an anti pattern, there is some discussion about it on stackoverflow. |
Sure thing, but there are exceptions to this. In this situation, exceptions play really nice.
As a result, you have a really great application flow that wouldn't be possible without these exceptions. |
And exceptions are not not designed for this kind of control flow. In a website that has thousands of hits an hour, using Exceptions as Control Flow is terrible performance wise, and doesn't scale. At all. Why encourage bad design? |
I can't get behind this idea at all. Throwable response will not work in Slim. The idea being that you can immediately terminate from the app strikes me as weird as it's you need to go back through your middleware to complete any actions, throwing response breaks that. |
Populus locutus est, closing as there is a clear consensus, no need to pursue. |
Would you be interested in a feature like laravel/framework#13473?
Currently, throwing a response requires the following. As more,
SlimException
isn't really appropriate.Whereas a few additions would allow to do this:
Note the request isn't used actually.
The text was updated successfully, but these errors were encountered: