[Checkins] [zopefoundation/zope.configuration] 43ff10: Simplify exception chaining and nested exception e...
GitHub
noreply at github.com
Mon Oct 1 12:55:01 CEST 2018
Branch: refs/heads/master
Home: https://github.com/zopefoundation/zope.configuration
Commit: 43ff10a5e36733baf521f232792f9847265fe723
https://github.com/zopefoundation/zope.configuration/commit/43ff10a5e36733baf521f232792f9847265fe723
Author: Jason Madden <jamadden at gmail.com>
Date: 2018-09-28 (Fri, 28 Sep 2018)
Changed paths:
M CHANGES.rst
M docs/narr.rst
M src/zope/configuration/config.py
M src/zope/configuration/exceptions.py
M src/zope/configuration/tests/test_config.py
M src/zope/configuration/tests/test_xmlconfig.py
M src/zope/configuration/xmlconfig.py
Log Message:
-----------
Simplify exception chaining and nested exception error messages.
Fixes #43
Given a/b/c/d.zcml included in that order with an error in d.zcml,
previously we would get this:
```
Traceback (most recent call last):
...
raise InvalidDottedName(value).with_field_and_value(self, value)
zope.schema.interfaces.InvalidDottedName: invalid dotted name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
raise InvalidDottedName(value).with_field_and_value(self, value)
zope.configuration.exceptions.ConfigurationError: ('Invalid value for', 'package', 'invalid dotted name')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
raise InvalidDottedName(value).with_field_and_value(self, value)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/tmp/d.zcml", line 2.4-2.58
ConfigurationError: ('Invalid value for', 'package', 'invalid dotted name')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
raise InvalidDottedName(value).with_field_and_value(self, value)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/tmp/c.zcml", line 2.4-2.29
ZopeXMLConfigurationError: File "/tmp/d.zcml", line 2.4-2.58
ConfigurationError: ('Invalid value for', 'package', 'invalid dotted name')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
raise InvalidDottedName(value).with_field_and_value(self, value)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/tmp/b.zcml", line 2.4-2.29
ZopeXMLConfigurationError: File "/tmp/c.zcml", line 2.4-2.29
ZopeXMLConfigurationError: File "/tmp/d.zcml", line 2.4-2.58
ConfigurationError: ('Invalid value for', 'package', 'invalid dotted name')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
...
raise InvalidDottedName(value).with_field_and_value(self, value)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/tmp/a.zcml", line 2.4-2.29
ZopeXMLConfigurationError: File "/tmp/b.zcml", line 2.4-2.29
ZopeXMLConfigurationError: File "/tmp/c.zcml", line 2.4-2.29
ZopeXMLConfigurationError: File "/tmp/d.zcml", line 2.4-2.58
ConfigurationError: ('Invalid value for', 'package', 'invalid dotted name')
```
Now we get the simpler:
```
Traceback (most recent call last):
...
File "/Users/jmadden/Projects/GithubSources/zope.schema/src/zope/schema/_field.py", line 670, in _validate
raise InvalidDottedName(value).with_field_and_value(self, value)
zope.schema.interfaces.InvalidDottedName: invalid dotted name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
...
raise InvalidDottedName(value).with_field_and_value(self, value)
zope.configuration.exceptions.ConfigurationError: Invalid value for 'package': InvalidDottedName('invalid dotted name')
zope.schema.interfaces.InvalidDottedName: invalid dotted name
File "/tmp/d.zcml", line 2.4-2.58
File "/tmp/c.zcml", line 2.4-2.29
File "/tmp/b.zcml", line 2.4-2.29
File "/tmp/a.zcml", line 2.4-2.29
```
Commit: 2b68d749272cb1fcbe10ad02eab9e9bdb9ff8f0d
https://github.com/zopefoundation/zope.configuration/commit/2b68d749272cb1fcbe10ad02eab9e9bdb9ff8f0d
Author: Jason Madden <jamadden at gmail.com>
Date: 2018-09-28 (Fri, 28 Sep 2018)
Changed paths:
M src/zope/configuration/config.py
M src/zope/configuration/xmlconfig.py
Log Message:
-----------
Simplify the catch block in execute_actions.
Commit: bf468b939411a785dbab5344cfc471369975edd8
https://github.com/zopefoundation/zope.configuration/commit/bf468b939411a785dbab5344cfc471369975edd8
Author: Jason Madden <jamadden at gmail.com>
Date: 2018-09-28 (Fri, 28 Sep 2018)
Changed paths:
M src/zope/configuration/tests/test_xmlconfig.py
M src/zope/configuration/xmlconfig.py
Log Message:
-----------
Simplify ZopeSAXParseException.
We don't seem to need to do the reformating it claimed was for emacs.
Commit: 6eb8ddc6d99537757031676550a093c9552f867c
https://github.com/zopefoundation/zope.configuration/commit/6eb8ddc6d99537757031676550a093c9552f867c
Author: Jason Madden <jamadden at gmail.com>
Date: 2018-09-28 (Fri, 28 Sep 2018)
Changed paths:
M src/zope/configuration/config.py
M src/zope/configuration/exceptions.py
M src/zope/configuration/xmlconfig.py
Log Message:
-----------
Simplify detail formatting and 100% coverage.
Commit: 6a7c967c4df0db7ddcc1dcdeb09fbe2ce637d988
https://github.com/zopefoundation/zope.configuration/commit/6a7c967c4df0db7ddcc1dcdeb09fbe2ce637d988
Author: Jason Madden <jamadden at gmail.com>
Date: 2018-09-28 (Fri, 28 Sep 2018)
Changed paths:
M src/zope/configuration/config.py
M src/zope/configuration/tests/test_config.py
Log Message:
-----------
Conflict errors should also report any details.
Also tweak config.py docs to link to exception classes.
Commit: 268cb192ce7dc3fbbe375bca7f8a62b9af4ac2d6
https://github.com/zopefoundation/zope.configuration/commit/268cb192ce7dc3fbbe375bca7f8a62b9af4ac2d6
Author: Jason Madden <jamadden at gmail.com>
Date: 2018-09-28 (Fri, 28 Sep 2018)
Changed paths:
M src/zope/configuration/config.py
M src/zope/configuration/tests/test_config.py
Log Message:
-----------
Include the details also in the invalid default value case too.
Commit: 1c300ede17e760731f4e25d3153b5afaa0eadd1d
https://github.com/zopefoundation/zope.configuration/commit/1c300ede17e760731f4e25d3153b5afaa0eadd1d
Author: Jason Madden <jamadden at gmail.com>
Date: 2018-09-28 (Fri, 28 Sep 2018)
Changed paths:
M src/zope/configuration/tests/test_config.py
Log Message:
-----------
Also test the repr of ConfigurationError.
Commit: eb043b2da75e689b0e5a96007c581d4e9a6f3aaf
https://github.com/zopefoundation/zope.configuration/commit/eb043b2da75e689b0e5a96007c581d4e9a6f3aaf
Author: Jason Madden <jason+github at nextthought.com>
Date: 2018-10-01 (Mon, 01 Oct 2018)
Changed paths:
M CHANGES.rst
M docs/narr.rst
M src/zope/configuration/config.py
M src/zope/configuration/exceptions.py
M src/zope/configuration/tests/test_config.py
M src/zope/configuration/tests/test_xmlconfig.py
M src/zope/configuration/xmlconfig.py
Log Message:
-----------
Merge pull request #45 from zopefoundation/issue43
Simplify exception chaining and nested exception error messages.
Compare: https://github.com/zopefoundation/zope.configuration/compare/7c98fbbc5b1b...eb043b2da75e
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the checkins
mailing list