This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Forward port error handling to 2.0.0 #79
Merged
weierophinney
merged 10 commits into
zendframework:dev-2.0.0
from
weierophinney:feature/error-handling-v2
Nov 8, 2016
Merged
Forward port error handling to 2.0.0 #79
weierophinney
merged 10 commits into
zendframework:dev-2.0.0
from
weierophinney:feature/error-handling-v2
Nov 8, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When enabled, any middleware dispatch is no longer wrapped in try/catch blocks, allowing for exceptions/throwables to bubble out.
Added `$raiseThrowables` property and `raiseThrowables()` method, with the former defaulting to `false` for backwards compatibility. Has the following behavior: - Enables the same flag in the `Dispatch` instance composed. - If enabled and `$err` is passed to `__invoke()`: - Throwable/Exception values are simply thrown. - String arguments are used as the message for a new `MiddlewareException`. - Scalar values are reported in a new `MiddlewareException` - Array value *types* are reported in a new `MiddlewareException` - Object *types* are reported in a new `MiddlewareException` - Non-throwable/exception types trigger the deprecation notice
- Disabled by default - `raiseThrowables()` enables it - When enabled, calls same method on `Next` instance after creating it
…ndling-v2 Forward-ports zendframework#78 to dev-2.0.0. Conflicts: src/Dispatch.php src/MiddlewarePipe.php src/Next.php test/DispatchTest.php test/NextTest.php
Removed section on $out, and replaced with detail on $delegate.
Ensure all paths in Dispatch are covered.
…ndling-v2 Forward port changes made for zendframework#78 (in this case, tests that are no longer applicable). Conflicts: test/DispatchTest.php
…ndling-v2 Forward port changes from zendframework#78. Conflicts: src/Dispatch.php
weierophinney
added a commit
that referenced
this pull request
Nov 8, 2016
weierophinney
added a commit
that referenced
this pull request
Nov 8, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch forward ports the changes from #78 to the dev-2.0.0 branch. For the most part, this results in removal of the feature, as it is made obsolete by the 2.0.0 architecture; the one feature kept is that the
MiddlewarePipe::raiseThrowables()
method is kept, but deprecated, to allow code changes made for 1.3.0 to opt-in to the ability to raise throwables to continue to work without change when upgrading.