[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5186 - trunk/gnue-appserver/src/classrep
From: |
reinhard |
Subject: |
r5186 - trunk/gnue-appserver/src/classrep |
Date: |
Fri, 27 Feb 2004 16:53:11 -0600 (CST) |
Author: reinhard
Date: 2004-02-27 16:53:10 -0600 (Fri, 27 Feb 2004)
New Revision: 5186
Modified:
trunk/gnue-appserver/src/classrep/Base.py
trunk/gnue-appserver/src/classrep/Class.py
trunk/gnue-appserver/src/classrep/Module.py
trunk/gnue-appserver/src/classrep/Namespace.py
trunk/gnue-appserver/src/classrep/Procedure.py
trunk/gnue-appserver/src/classrep/Property.py
Log:
Improved error handling.
Modified: trunk/gnue-appserver/src/classrep/Base.py
===================================================================
--- trunk/gnue-appserver/src/classrep/Base.py 2004-02-27 22:30:35 UTC (rev
5185)
+++ trunk/gnue-appserver/src/classrep/Base.py 2004-02-27 22:53:10 UTC (rev
5186)
@@ -142,7 +142,7 @@
self._items [key] = self._getNewItem (list [0])
return self._items [key]
- raise EItemNotFound (self.table, key)
+ raise self.__class__._notFoundException (key)
Modified: trunk/gnue-appserver/src/classrep/Class.py
===================================================================
--- trunk/gnue-appserver/src/classrep/Class.py 2004-02-27 22:30:35 UTC (rev
5185)
+++ trunk/gnue-appserver/src/classrep/Class.py 2004-02-27 22:53:10 UTC (rev
5186)
@@ -32,6 +32,8 @@
# =============================================================================
class ClassDict (BaseDictionary):
+ _notFoundException = EClassNotFound
+
# ---------------------------------------------------------------------------
# Create a dictionary with all classes [from a specified module]
# ---------------------------------------------------------------------------
Modified: trunk/gnue-appserver/src/classrep/Module.py
===================================================================
--- trunk/gnue-appserver/src/classrep/Module.py 2004-02-27 22:30:35 UTC (rev
5185)
+++ trunk/gnue-appserver/src/classrep/Module.py 2004-02-27 22:53:10 UTC (rev
5186)
@@ -32,6 +32,8 @@
class ModuleDict (BaseDictionary):
+ _notFoundException = EModuleNotFound
+
# ---------------------------------------------------------------------------
# This class behaves like a dictionary of all available modules with the
# keys being the module names and the values being Module objects.
Modified: trunk/gnue-appserver/src/classrep/Namespace.py
===================================================================
--- trunk/gnue-appserver/src/classrep/Namespace.py 2004-02-27 22:30:35 UTC
(rev 5185)
+++ trunk/gnue-appserver/src/classrep/Namespace.py 2004-02-27 22:53:10 UTC
(rev 5186)
@@ -84,15 +84,6 @@
EClassRepository.__init__ (self, msg)
# =============================================================================
-# Requested property does not exist
-# =============================================================================
-class EItemNotFound (EClassRepository):
- def __init__ (self, tablename, key):
- msg = "Broken class repository: Item '%s' not found in %s list." \
- % (key, tablename)
- EClassRepository.__init__ (self, msg)
-
-# =============================================================================
# Class repository definition file has an invalid structure
# =============================================================================
class EInvalidDefinition (EClassRepository):
Modified: trunk/gnue-appserver/src/classrep/Procedure.py
===================================================================
--- trunk/gnue-appserver/src/classrep/Procedure.py 2004-02-27 22:30:35 UTC
(rev 5185)
+++ trunk/gnue-appserver/src/classrep/Procedure.py 2004-02-27 22:53:10 UTC
(rev 5186)
@@ -30,6 +30,8 @@
# =============================================================================
class ProcedureDict (BaseDictionary):
+ _notFoundException = EProcedureNotFound
+
# ---------------------------------------------------------------------------
# Construct a Procedure-Dictionary for class aClass
# ---------------------------------------------------------------------------
Modified: trunk/gnue-appserver/src/classrep/Property.py
===================================================================
--- trunk/gnue-appserver/src/classrep/Property.py 2004-02-27 22:30:35 UTC
(rev 5185)
+++ trunk/gnue-appserver/src/classrep/Property.py 2004-02-27 22:53:10 UTC
(rev 5186)
@@ -30,6 +30,8 @@
# =============================================================================
class PropertyDict (BaseDictionary):
+ _NotFoundException = EPropertyNotFound
+
# ---------------------------------------------------------------------------
# Construct a Property-Dictionary for class aClass
# ---------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5186 - trunk/gnue-appserver/src/classrep,
reinhard <=