zopefoundation / zope.exceptions

exceptions and implementations which are general purpose
https://zopeexceptions.readthedocs.io/
Other
0 stars 6 forks source link

fix issues around limiting, fix recursive extractStack #2

Closed agroszer closed 9 years ago

agroszer commented 9 years ago

thought so... gotta improve on 3.x

mgedmin commented 9 years ago

LGTM.

I'd mildly prefer 'blah blah {omitted} blah'.format(omitted=42) to old-style 'blah blah %(omitted)d blah' % dict(omitted=42), but that's minor.

I'm also somewhat curious about the extractStack() recursion protection. It's to defend against bugs in the exception formatter itself?

agroszer commented 9 years ago

extractStack: holy-smoly, I added that in a9f60fb4a40a01c4d52bdac071c1a3ec43281be1, of course forgot why test_extractStack_w_recursive_frames_and_limit showed that removing the limit sent extractStack into an endless loop, that code is just a hunch based on formatException

tseaver commented 9 years ago

@agroszer LGTM