Commit 2e286e4a authored by Nicolas Dumazet's avatar Nicolas Dumazet

improve error messages


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40201 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1fc6d538
......@@ -129,11 +129,16 @@ def generatePortalTypeClass(portal_type_name):
mixin_list = []
interface_list = []
type_class_path = document_class_registry.get(type_class)
if type_class_path is None:
if type_class is None:
raise AttributeError('Document class is not defined on Portal Type %s' \
% portal_type_name)
type_class_path = document_class_registry.get(type_class)
if type_class_path is None:
raise AttributeError('Document class %s has not been registered:' \
' cannot import it as base of Portal Type %s' \
% (type_class, portal_type_name))
klass = _importClass(type_class_path)
## Disabled because there will be no commit of
......
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