Skip to content

Conversation

@ogizanagi
Copy link
Contributor

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #26648 (comment)
License MIT
Doc PR N/A

To me, a missing handler for a message is a program logic exception (or misconfiguration). Even if it's only detected at runtime here.
It's the same as ServiceNotFoundException which even is an \InvalidArgumentException. Could eventually also be the case here.

Copy link
Contributor

@sroze sroze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it makes sense!

@fabpot
Copy link
Member

fabpot commented Mar 30, 2018

Thank you @ogizanagi.

@fabpot fabpot merged commit 0489bbd into symfony:master Mar 30, 2018
fabpot added a commit that referenced this pull request Mar 30, 2018
…ception (ogizanagi)

This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Make NoHandlerForMessageException a logic exception

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26648 (comment)   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

To me, a missing handler for a message is a program logic exception (or misconfiguration). Even if it's only detected at runtime here.
It's the same as `ServiceNotFoundException` which even is an `\InvalidArgumentException`. Could eventually also be the case here.

Commits
-------

0489bbd [Messenger] Make NoHandlerForMessageException a logic exception
@ogizanagi ogizanagi deleted the fix/messanger/no_handler_logic_ex branch March 30, 2018 08:38
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.

5 participants