Skip to content

Better exception message when class not found #35

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

Closed
Nyholm opened this issue Dec 29, 2015 · 2 comments
Closed

Better exception message when class not found #35

Nyholm opened this issue Dec 29, 2015 · 2 comments

Comments

@Nyholm
Copy link
Member

Nyholm commented Dec 29, 2015

When we do not find a factory we throw an exception like this:

"No factories found. Install php-http/message to use Guzzle or Diactoros factories."

This is not correct. You could have php-http/message installed and still get this error. We should explain better that you need php-http/message and an implementation of PSR-7.

Same with the HttpAsyncClientDiscovery and HttpClientDiscovery, atm we get an exception saying "Not found". This could also be improved.

@sagikazarmark
Copy link
Member

You are right, the message is incorrect.

As for the other discoveries: We could extend the message to say that the given resource type has no available implementation.

@Nyholm
Copy link
Member Author

Nyholm commented Dec 29, 2015

👍

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

No branches or pull requests

2 participants