Commit 7bf888cf authored by Jérome Perrin's avatar Jérome Perrin

Reraise RuntimeError as well as ConflictError


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4991 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e7d6946c
...@@ -72,9 +72,9 @@ def get_value(self, id, **kw): ...@@ -72,9 +72,9 @@ def get_value(self, id, **kw):
kw['here'] = object kw['here'] = object
kw['container'] = container kw['container'] = container
try : try :
kw['preferences'] = object.getPortalObject().portal_preferences kw['preferences'] = object.getPortalObject().portal_preferences
except AttributeError : except AttributeError :
LOG('ERP5Form', 0, LOG('ERP5Form', 0,
'portal_preferences not put in TALES context (not installed?)') 'portal_preferences not put in TALES context (not installed?)')
# This allows to pass some pointer to the local object # This allows to pass some pointer to the local object
# through the REQUEST parameter. Not very clean. # through the REQUEST parameter. Not very clean.
...@@ -86,8 +86,8 @@ def get_value(self, id, **kw): ...@@ -86,8 +86,8 @@ def get_value(self, id, **kw):
kw['cell'] = kw['REQUEST'] kw['cell'] = kw['REQUEST']
try: try:
value = tales_expr.__of__(self)(**kw) value = tales_expr.__of__(self)(**kw)
except ConflictError: except (ConflictError, RuntimeError):
pass raise
except: except:
# We add this safety exception to make sure we always get # We add this safety exception to make sure we always get
# something reasonable rather than generate plenty of errors # something reasonable rather than generate plenty of errors
......
...@@ -1637,7 +1637,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> ...@@ -1637,7 +1637,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
del kw['closed_summary'] del kw['closed_summary']
params = dict(kw) params = dict(kw)
selection.edit(params=params) selection.edit(params=params)
except ConflictError: except (ConflictError, RuntimeError):
raise raise
except: except:
LOG('ListBox', 0, 'WARNING: Could not call %s with %s: ' % (repr(attribute_value), repr(params)), error=sys.exc_info()) LOG('ListBox', 0, 'WARNING: Could not call %s with %s: ' % (repr(attribute_value), repr(params)), error=sys.exc_info())
...@@ -1680,7 +1680,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> ...@@ -1680,7 +1680,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
except TypeError: except TypeError:
attribute_value = attribute_value() attribute_value = attribute_value()
attribute_original_value = attribute_value attribute_original_value = attribute_value
except ConflictError: except (ConflictError, RuntimeError):
raise raise
except: except:
LOG('ListBox', 0, 'Could not evaluate', error=sys.exc_info()) LOG('ListBox', 0, 'Could not evaluate', error=sys.exc_info())
...@@ -1776,10 +1776,9 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> ...@@ -1776,10 +1776,9 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
# Call the requested method # Call the requested method
try: try:
object_url = url_method(brain=o, selection=selection) object_url = url_method(brain=o, selection=selection)
except ConflictError: except (ConflictError, RuntimeError):
raise raise
except: except:
# XXX FIXME: except without Error name
LOG('ListBox', 0, LOG('ListBox', 0,
'Could not evaluate url_method %s' % \ 'Could not evaluate url_method %s' % \
column[1], error=sys.exc_info()) column[1], error=sys.exc_info())
...@@ -1796,7 +1795,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> ...@@ -1796,7 +1795,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
else: else:
try: try:
object_url = url_method(alias, i, selection_name) object_url = url_method(alias, i, selection_name)
except ConflictError: except (ConflictError, RuntimeError):
raise raise
except: except:
# XXX FIXME: except without Error name # XXX FIXME: except without Error name
...@@ -1878,7 +1877,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> ...@@ -1878,7 +1877,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
#params['operator'] = stats[n] #params['operator'] = stats[n]
#value=value(**params) #value=value(**params)
value=value(selection=selection) value=value(selection=selection)
except ConflictError: except (ConflictError, RuntimeError):
raise raise
except: except:
LOG('ListBox', 0, 'WARNING: Could not call %s with %s: ' % (repr(value), repr(params)), error=sys.exc_info()) LOG('ListBox', 0, 'WARNING: Could not call %s with %s: ' % (repr(value), repr(params)), error=sys.exc_info())
......
...@@ -231,7 +231,7 @@ if HAS_ZODB_RESOURCE_HANDLER: ...@@ -231,7 +231,7 @@ if HAS_ZODB_RESOURCE_HANDLER:
if callable(obj): if callable(obj):
try: try:
obj = obj() obj = obj()
except ConflictError: except (ConflictError, RuntimeError):
raise raise
except: except:
pass pass
...@@ -262,7 +262,7 @@ else: ...@@ -262,7 +262,7 @@ else:
if callable(obj): if callable(obj):
try: try:
obj = obj() obj = obj()
except ConflictError: except (ConflictError, RuntimeError):
raise raise
except: except:
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment