Closed esurov closed 4 months ago
Thanks for your comments gentlemen @gmazzap @shvlv ! 👍
First of all: Really big thanks for the work you invested. ☕ But, this PR is sitting now for a while and I'm going to close it. We're not going to implement custom Exception classes for this package.
Instead of using \Exception for everything we'd like to distinguish different exceptions by name.
Not only it better matches the PSR-11 being implemented in subject, but also it improves the code testability. Instead of parsing the exception message we can better control the exception class.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
It improves the exception handling by introducing the named exceptions and improving the tests.
What is the current behavior? (You can also link to an open issue here)
Currently \Exception class is used everywhere. Instead we want to use named exception.
What is the new behavior (if this is a feature change)?
Code structure and tests quality improved.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.
Other information: