Fix exception message for keyNames parameter to WikiPage::getAllSection#133
Conversation
803366d to
1876cdd
Compare
waldyrious
left a comment
There was a problem hiding this comment.
Just a minor suggestion for the changelog entry. Also, the commit message exceeds the recommended guideline for commit message length and indeed GitHub cuts off the message at the 70th character: see 1876cdd. Could you shorten it a bit?
1876cdd to
fba99aa
Compare
Done, but I realize I'm being a bit hasty on this PR. Please don't merge it yet, it can simmer a few hours, or until tomorrow. |
fba99aa to
4c07250
Compare
|
The backslash on the exception name specifies global namespace, something I'm not very familiar with yet. But I've come to understand this may better also be used on the 'new stdClass' added in #119. I hesitated to do that at the time. However, because Wikimate itself doesn't define a namespace (yet?) there's no difference in practice. So it would be overkill to make a separate one-character PR for this. But before you hate me for sneaking that change into this PR 😆 I figured I better raise the topic first. Would you accept it in this case? |
Sure :)
Ah, I did wonder if that could have been a typo of some sort! 😄
Hahah, no worries :) I think you've been quite measured with the snuck-in changes ;) I agree that a one-character change, to adopt a syntax that is already being introduced in this PR, is quite reasonable. |
c4e2ce5 to
7dffdc6
Compare
7dffdc6 to
225b742
Compare
Other than the linefeeds topic, this PR is now good to go. |
While reviewing the exception/error handling situation this one jumped out just now. The single quotes meant that $keyNames was shown verbatim, not its value. Now the message clarifies which parameter has what unexpected value.
The exception type is also changed to the more specific and appropriate UnexpectedValueException.