-
Notifications
You must be signed in to change notification settings - Fork 535
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
Adding more dedicated exceptions #739
Conversation
👍 I like your idea of dedicated exceptions. While we are at it, can you think of other exception types? The remarks are also important, but I would like to discuss these in a separate issue/pull request. A dedicated CONTRIBUTING.md file seems to be a good idea. Would you mind suggesting one in a separate PR? |
Fulltext search for
I'm a beginner with git, so I'm probably the wrong person. As a starting point, you can copy over what you currently have. I was annoyed yesterday to find your checklist only after I had finished my PR - so the idea is just to tell people upfront :-) |
Sorry for my delayed response. To move this forward, the code should be inspected to find further instances of these exceptions. Only replacing a few instances without covering the whole code base might lead to false implications by developers when using the API. @ThomasLandauer would you mind searching for further instances where using these new exceptions might be a good idea? |
Closing this for now due to inactivity by the author. Feel free to comment when you want to continue working on it. |
Sorry, I didn't know what to do exactly. Do you want me to just replace all occurrences of "my" 2 exceptions? Or create a new exception for every other |
Please go through the code to find further instances of these exceptions and replace them with the new ones when appropriate. |
There are ~20 places where exceptions are thrown, but these 2 new appear only once. So IMO you can merge this. |
also fixed some coding style issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking.
Here is a brief summary of my latest changes:
- added a short comment for each new exception
- added another exception (NotImplementedException)
- fixed coding style issues (
ran dev-tools/vendor/bin/php-cs-fixer fix
locally)
Type of pull request
About
Adding 2 dedicated exceptions, following the path of #433
2 remarks:
CONTRIBUTING.md
, according to https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors and include all information from the checklist (here below)Checklist for code / configuration changes
In case you changed the code/configuration, please read each of the following checkboxes as they contain valuable information: