Commit 66c88059 authored by Jérome Perrin's avatar Jérome Perrin

raise the Exception with an error message


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3598 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d38efdc5
......@@ -952,12 +952,20 @@ class CategoryTool( UniqueObject, Folder, Base ):
base_category_id = base_category_value.getId()
for category_value in category_value_list:
if category_value is None :
LOG('CMFCategory', PROBLEM,
"category does not exists for %s (%s)"%(context.getPath(), category_list))
message = "category does not exists for %s (%s)"%(
context.getPath(), category_list)
LOG('CMFCategory', PROBLEM, message)
raise CategoryError (message)
else :
result.append('%s/%s' % (base_category_id, category_value.getRelativeUrl()))
else :
for category_value in category_value_list:
if category_value is None :
message = "category does not exists for %s (%s)"%(
context.getPath(), category_list)
LOG('CMFCategory', PROBLEM, message)
raise CategoryError (message)
else :
result.append(category_value.getRelativeUrl())
# WE MUST IMPLEMENT HERE THE REST OF THE SEMANTICS
#LOG("Get Acquired Category Result ",0,str(result))
......
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