[Erp5-report] r12129 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 18 14:24:49 CET 2007


Author: romain
Date: Thu Jan 18 14:24:46 2007
New Revision: 12129

URL: http://svn.erp5.org?rev=12129&view=rev
Log:
Increase errors verbosity.

Modified:
    erp5/trunk/products/ERP5/Document/BusinessTemplate.py

Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=12129&r1=12128&r2=12129&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py Thu Jan 18 14:24:46 2007
@@ -498,7 +498,10 @@
     BaseTemplateItem.build(self, context, **kw)
     p = context.getPortalObject()
     for relative_url in self._archive.keys():
-      obj = p.unrestrictedTraverse(relative_url)
+      try:
+        obj = p.unrestrictedTraverse(relative_url)
+      except ValueError:
+        raise ValueError, "Can not access to %s" % relative_url
       try:
         obj = obj._getCopy(context)
       except AttributeError:
@@ -2700,7 +2703,7 @@
       if key in sql_search_result_keys:
         key_list.append(key)
       else:
-        raise NotFound, 'key %r not found in catalog' %(key,)
+        raise NotFound, 'Result key %r not found in catalog' %(key,)
     if len(key_list) > 0:
       self._objects[self.__class__.__name__+os.sep+'result_key_list'] = key_list
 
@@ -2791,7 +2794,7 @@
       if key in sql_search_related_keys:
         key_list.append(key)
       else:
-        raise NotFound, 'key %r not found in catalog' %(key,)
+        raise NotFound, 'Related key %r not found in catalog' %(key,)
     if len(key_list) > 0:
       self._objects[self.__class__.__name__+os.sep+'related_key_list'] = key_list
 
@@ -2885,7 +2888,7 @@
       if key in sql_search_result_tables:
         key_list.append(key)
       else:
-        raise NotFound, 'key %r not found in catalog' %(key,)
+        raise NotFound, 'Result table %r not found in catalog' %(key,)
     if len(key_list) > 0:
       self._objects[self.__class__.__name__+os.sep+'result_table_list'] = key_list
 
@@ -2977,7 +2980,7 @@
       if key in sql_keyword_keys:
         key_list.append(key)
       else:
-        raise NotFound, 'key %r not found in catalog' %(key,)
+        raise NotFound, 'Keyword key %r not found in catalog' %(key,)
     if len(key_list) > 0:
       self._objects[self.__class__.__name__+os.sep+'keyword_key_list'] = key_list
 
@@ -3069,7 +3072,7 @@
       if key in sql_full_text_keys:
         key_list.append(key)
       else:
-        raise NotFound, 'key %r not found in catalog' %(key,)
+        raise NotFound, 'Fulltext key %r not found in catalog' %(key,)
     if len(key_list) > 0:
       self._objects[self.__class__.__name__+os.sep+'full_text_key_list'] = key_list
 
@@ -3162,7 +3165,7 @@
       if key in sql_request_keys:
         key_list.append(key)
       else:
-        raise NotFound, 'key %r not found in catalog' %(key,)
+        raise NotFound, 'Request key %r not found in catalog' %(key,)
     if len(key_list) > 0:
       self._objects[self.__class__.__name__+os.sep+'request_key_list'] = key_list
 
@@ -3254,7 +3257,7 @@
       if key in sql_multivalue_keys:
         key_list.append(key)
       else:
-        raise NotFound, 'key %r not found in catalog' %(key,)
+        raise NotFound, 'Multivalue key %r not found in catalog' %(key,)
     if len(key_list) > 0:
       self._objects[self.__class__.__name__+os.sep+'multivalue_key_list'] = key_list
 
@@ -3345,7 +3348,7 @@
       if key in sql_catalog_topic_search_keys:
         key_list.append(key)
       else:
-        raise NotFound, 'key %r not found in catalog' %(key,)
+        raise NotFound, 'Topic key %r not found in catalog' %(key,)
     if len(key_list) > 0:
       self._objects[self.__class__.__name__+os.sep+'topic_key_list'] = key_list
 




More information about the Erp5-report mailing list