summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-02-19 00:19:16 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-02-19 00:19:16 +0000
commitf1a68f37fa9aea41d21049307fef840f9b6a0116 (patch)
treed762e8e262f0ed6d31c689912fdb82dc55771ad1 /lib/sqlalchemy/util.py
parent2d5e6eb93b08961d557399899a51dac225832716 (diff)
downloadsqlalchemy-f1a68f37fa9aea41d21049307fef840f9b6a0116.tar.gz
exception package added, support throughout
Diffstat (limited to 'lib/sqlalchemy/util.py')
-rw-r--r--lib/sqlalchemy/util.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py
index 633091dd3..301db0ec4 100644
--- a/lib/sqlalchemy/util.py
+++ b/lib/sqlalchemy/util.py
@@ -6,6 +6,7 @@
__all__ = ['OrderedProperties', 'OrderedDict', 'generic_repr', 'HashSet']
import thread, weakref, UserList,string, inspect
+from exceptions import *
def to_list(x):
if x is None:
@@ -257,7 +258,7 @@ class HistoryArraySet(UserList.UserList):
return id(self)
def _setrecord(self, item):
if self.readonly:
- raise "This list is read only"
+ raise InvalidRequestError("This list is read only")
try:
val = self.records[item]
if val is True or val is None:
@@ -270,7 +271,7 @@ class HistoryArraySet(UserList.UserList):
return True
def _delrecord(self, item):
if self.readonly:
- raise "This list is read only"
+ raise InvalidRequestError("This list is read only")
try:
val = self.records[item]
if val is None:
@@ -428,7 +429,7 @@ def constructor_args(instance, **kwargs):
if hasattr(instance, arg):
newparams[arg] = getattr(instance, arg)
else:
- raise "instance has no attribute '%s'" % arg
+ raise AssertionError("instance has no attribute '%s'" % arg)
return newparams
\ No newline at end of file