commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6191 - trunk/gnue-common/src/datasources


From: johannes
Subject: r6191 - trunk/gnue-common/src/datasources
Date: Mon, 16 Aug 2004 02:16:53 -0500 (CDT)

Author: johannes
Date: 2004-08-16 02:16:52 -0500 (Mon, 16 Aug 2004)
New Revision: 6191

Modified:
   trunk/gnue-common/src/datasources/GDataSource.py
Log:
Catch distant errors


Modified: trunk/gnue-common/src/datasources/GDataSource.py
===================================================================
--- trunk/gnue-common/src/datasources/GDataSource.py    2004-08-16 07:16:16 UTC 
(rev 6190)
+++ trunk/gnue-common/src/datasources/GDataSource.py    2004-08-16 07:16:52 UTC 
(rev 6191)
@@ -30,7 +30,7 @@
 #
 # $Id: $
 
-from gnue.common.apps import GDebug
+from gnue.common.apps import GDebug, i18n
 from gnue.common.datasources import GDataObjects
 from gnue.common.definitions import GObjects
 import sys, string, types, cStringIO
@@ -39,7 +39,9 @@
 from gnue.common.datasources import GConditions, Exceptions
 from gnue.common.definitions.GParserHelpers import GContent
 
+from gnue.common.rpc import client
 
+
 ########################################################################
 #
 # Class that handles DataSources.  This is a subclass of GObj, which
@@ -739,8 +741,16 @@
   rs = dts.createResultSet (mc)
   if rs.firstRecord ():
     paramDict ['connection'] = connection
-    res = rs.current.callFunc ("gnue_%s" % element, paramDict)
 
+    try:
+      res = rs.current.callFunc ("gnue_%s" % element, paramDict)
+
+    except client.DistantError, distErr:
+      raise Exception, distErr.detail
+
+    except Exception, e:
+      raise
+
     if debugFileName is not None:
       dfile = open (debugFileName, 'w')
       dfile.write (res.encode ('utf-8'))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]