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

Exception wrapping #16

Open
SamMousa opened this issue Feb 25, 2019 · 4 comments
Open

Exception wrapping #16

SamMousa opened this issue Feb 25, 2019 · 4 comments

Comments

@SamMousa
Copy link

It would be great if this library mapped error responses to exception classes.
Currently when using this we are forced to check the faultstring and faultcode properties of SoapFaults, this breaks the API abstraction.

@hiddeco
Copy link
Owner

hiddeco commented Feb 25, 2019

Happy to accept a pull request to support this -- I personally do not have time to implement this at time of writing.

@SamMousa
Copy link
Author

Great, will see if I do 👍

@petericebear
Copy link
Contributor

@SamMousa can you describe a bit more what you need or willing to achieve? Maybe I can help also..

@SamMousa
Copy link
Author

The goal is to be able to identify errors based on the exception class only.
So as a consumer of the library I'd want to do something like this:

try {
    $client->doSomething();
} catch(TransIp\NotAllowedException $e) {

} catch(SomeOtherException $e) {

}

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

3 participants