Commit f551df81 authored by Fabien Morin's avatar Fabien Morin

Try/Except hide the traceback, in this case, it's better to have the traceback

to better identify the origin of the problem.

Thanks to Jérome and Danièle


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35415 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a8ee8ef8
......@@ -72,10 +72,7 @@ class IdGenerator(Base):
Use int to store the last_id, use also a persistant mapping for to be
persistent.
"""
try:
specialise = self.getSpecialiseValue()
except AttributeError:
raise AttributeError, 'specialise is not defined'
if specialise is None:
raise ValueError, "the id generator %s doesn't have specialise value" %\
self.getReference()
......@@ -95,10 +92,7 @@ class IdGenerator(Base):
# For compatibilty with sql data, must not use id_group as a list
if not isinstance(id_group, str):
raise AttributeError, 'id_group is not a string'
try:
specialise = self.getSpecialiseValue()
except AttributeError:
raise AttributeError, 'specialise is not defined'
if specialise is None:
raise ValueError, "the id generator %s doesn't have specialise value" %\
self.getReference()
......
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