[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5765 - trunk/gnue-appserver/src
From: |
johannes |
Subject: |
r5765 - trunk/gnue-appserver/src |
Date: |
Tue, 27 Apr 2004 04:20:56 -0500 (CDT) |
Author: johannes
Date: 2004-04-27 04:20:56 -0500 (Tue, 27 Apr 2004)
New Revision: 5765
Modified:
trunk/gnue-appserver/src/geasSession.py
Log:
Raise an exception if a requested instance cannot be found.
Modified: trunk/gnue-appserver/src/geasSession.py
===================================================================
--- trunk/gnue-appserver/src/geasSession.py 2004-04-27 09:18:41 UTC (rev
5764)
+++ trunk/gnue-appserver/src/geasSession.py 2004-04-27 09:20:56 UTC (rev
5765)
@@ -29,7 +29,15 @@
from gnue.appserver import data
import geasList, geasInstance
+from gnue.common.datasources.GConditions import buildTreeFromPrefix,
getXMLelements, GCField
+class InstanceNotFoundError (gException):
+ def __init__ (self, classname, objectId):
+ msg = u_("Instance '%(objectId)s' of class '%(classname)s' not found") \
+ % {'objectId' : objectId,
+ 'classname': classname }
+ gException.__init__ (self, msg)
+
# =============================================================================
# Session class
# =============================================================================
@@ -257,6 +265,8 @@
fieldlist.append (pdef.column)
record = self.__connection.findRecord (table, object_id, fieldlist)
+ if record is None:
+ raise InstanceNotFoundError, (classdef.fullName, object_id)
return geasInstance.geasInstance (self, self.__connection, record,
classdef)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5765 - trunk/gnue-appserver/src,
johannes <=