plone / plone.app.viewletmanager

TTW configurable viewlet manager for Plone
https://pypi.org/project/plone.app.viewletmanager
1 stars 4 forks source link

Add Retry to uncatched_errors to support embedded formgen forms #5

Closed frisi closed 9 years ago

frisi commented 9 years ago

can we add ZPublisher.Publish.Retry to the list of _uncatched_errors in https://github.com/plone/plone.app.viewletmanager/blob/2.0.6/plone/app/viewletmanager/manager.py#L30 directly?

this would make embedded ploneformgenforms in viewlets work again. see https://github.com/smcmahon/Products.PloneFormGen/issues/130 for more details.

adding it here might help other addons using the same technique w/o a patch.

frisi commented 9 years ago

@kiorky and @tdesvenain as you did add/refactor the error message - what do you think about adding another exception type here by default?

frisi commented 9 years ago

@davisagli has voted for adding the exception here (https://github.com/smcmahon/Products.PloneFormGen/issues/130#issuecomment-63843342)

jean commented 9 years ago

can we add ZPublisher.Publish.Retry to the list of _uncatched_errors

Reading that, I tripped over the name '_uncatched_errors'. Besides being ungrammatical and miss-calling exceptions 'errors', from the code it looks like it means "exceptions handled elsewhere". Would '_delegated_exceptions' be an improvement?

Jean (apologies for drive-by crit ;-)

frisi commented 9 years ago

i think that's a valid point @jean. as this attribute has been introduced in plone 4.3.3 i think it's quite safe to rename it since not many people - if somebody at all - will have made use of it yet.

i'd go for _exceptions_handeled_elsewhere and add a comment with a link to this ticket so people can see why it's there and how other packages (PloneFormGen in this case) make use of it.

# sometimes viewlets raise errors handeled elsewhere - eg for embedded ploneformgen forms
# see https://github.com/plone/plone.app.viewletmanager/issues/5
_exceptions_handeled_elsewhere = (...)
jean commented 9 years ago

i'd go for _exceptions_handeled_elsewhere

Excellent, that's impossible to misunderstand :-)

If no one beats me to it, I'll create a pull req tonight or tomorrow ..

davisagli commented 9 years ago

But it's misspelled. Handled.

David Glick (mobile)

On Nov 21, 2014, at 2:40 AM, Jean Jordaan notifications@github.com wrote:

i'd go for _exceptions_handeled_elsewhere

Excellent, that's impossible to misunderstand :-)

jean . .. .... //\oo///\ — Reply to this email directly or view it on GitHub.

jean commented 9 years ago

But it's misspelled. Handled.

Uhm yes quite true. In my defense, I read it the way I wrote it in my original email :-]

jean . .. .... //\oo///\

jensens commented 9 years ago

merged #9