[Erp5-report] r14499 - /erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 15 16:35:02 CEST 2007


Author: ivan
Date: Tue May 15 16:35:01 2007
New Revision: 14499

URL: http://svn.erp5.org?rev=14499&view=rev
Log:
Catch all possible exception.

Modified:
    erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml

Modified: erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml?rev=14499&r1=14498&r2=14499&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml (original)
+++ erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml Tue May 15 16:35:01 2007
@@ -85,12 +85,15 @@
 # maximum lines to show\n
 maxlines = 5\n
 \n
+# try to convert object to text\n
 try:\n
-  txt = context.asText() or \'\'\n
-except AttributeError:\n
+  txt = context.asText()\n
+except:\n
   txt = \'\'\n
 \n
-argument_names = (\'advanced_search_text\', \'title\', \'reference\', \'SearchableText\', \'SearchableText_any\', \'SearchableText_all\', \'SearchableText_phrase\')\n
+argument_names = (\'advanced_search_text\', \'title\', \'reference\', \\\n
+                  \'SearchableText\', \'SearchableText_any\', \\\n
+                  \'SearchableText_all\', \'SearchableText_phrase\')\n
 \n
 # a quick hack because sometimes we get a list\n
 params = [selection.params.get(name, \'\') for name in argument_names]\n
@@ -171,7 +174,6 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>txt</string>
-                            <string>AttributeError</string>
                             <string>argument_names</string>
                             <string>append</string>
                             <string>$append0</string>




More information about the Erp5-report mailing list