Skip to content
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

Confusing $isFault in Client #53

Closed
piotrooo opened this issue Jul 27, 2015 · 2 comments
Closed

Confusing $isFault in Client #53

piotrooo opened this issue Jul 27, 2015 · 2 comments

Comments

@piotrooo
Copy link
Contributor

Why Client class has logic responsible for throwing exception when server return fault? It's little confusing for me, this is not responsibility of this class.

For me this exception should be thrown by parsers. And passing by reference could be removed.

For class NativeParser line could be changed for:

throw ResponseException::fault($result);

For class XmlReaderParser line could be set as internal variable and after all parsed document checked is fault was encountered and then throw exception.

@lstrojny
Copy link
Owner

Sounds like a good refactoring, agreed.

lstrojny added a commit that referenced this issue Jan 15, 2016
Refactored fault handling (issue #53).
@piotrooo
Copy link
Contributor Author

merged #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants