Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Exception message in Zend\Stdlib\AbstractOptions should use the actual used setter #7157

Conversation

Martin-P
Copy link
Contributor

The current exception message uses some fabricated setter which is not even used in the actual test in Zend\Stdlib\AbstractOptions line 103.

This PR changes the exception message and makes it use the actual used setter and thus creates a more accurate message. See: #7155 (comment)

@Martin-P Martin-P force-pushed the hotfix/abstractoptions-exception-message branch from 71b08a7 to 3f4c7ad Compare January 26, 2015 17:49
@Martin-P
Copy link
Contributor Author

Was thinking about changing the value of $setter itself, but it seems the usage of an actual different $setter value was a minor performance tweak added in f071041.

@Ocramius
Copy link
Member

I know I'm pedantic here, but can haz test?

@Martin-P
Copy link
Contributor Author

I added a test for the exception message, but I may hope nobody uses the exception message itself as a way to test which exception is thrown.

@Ocramius
Copy link
Member

may hope nobody uses the exception message itself as a way to test which exception is thrown

Yeah, it's not about that, it's mainly about the usual "cast to string" and such errors ;-)

Ocramius added a commit that referenced this pull request Feb 2, 2015
Ocramius added a commit that referenced this pull request Feb 2, 2015
@Ocramius Ocramius closed this in 49f3986 Feb 2, 2015
@Ocramius
Copy link
Member

Ocramius commented Feb 2, 2015

@Martin-P merged, thanks!

Had to manually apply changes to the develop rebase due to conflicts, no big deal tho.

master: 49f3986
develop: 5d6570f

@Martin-P Martin-P deleted the hotfix/abstractoptions-exception-message branch February 2, 2015 02:35
gianarb pushed a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants