From: richard Date: Thu, 12 Sep 2002 05:51:42 +0000 (+0000) Subject: nicer error message X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3136278a066fc41430ec0d39d437d776efba15ba;p=roundup.git nicer error message git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1149 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/backends/back_anydbm.py b/roundup/backends/back_anydbm.py index 12ba0e4..d1e0aa3 100644 --- a/roundup/backends/back_anydbm.py +++ b/roundup/backends/back_anydbm.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.75 2002-09-10 12:44:42 richard Exp $ +#$Id: back_anydbm.py,v 1.76 2002-09-12 05:51:42 richard Exp $ ''' This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python @@ -1354,7 +1354,7 @@ class Class(hyperdb.Class): otherwise a KeyError is raised. ''' if not self.key: - raise TypeError, 'No key property set' + raise TypeError, 'No key property set for class %s'%self.classname cldb = self.db.getclassdb(self.classname) try: for nodeid in self.db.getnodeids(self.classname, cldb): diff --git a/roundup/backends/back_gadfly.py b/roundup/backends/back_gadfly.py index 7bde8f7..e0f2bc3 100644 --- a/roundup/backends/back_gadfly.py +++ b/roundup/backends/back_gadfly.py @@ -1,4 +1,4 @@ -# $Id: back_gadfly.py,v 1.16 2002-09-11 01:20:09 richard Exp $ +# $Id: back_gadfly.py,v 1.17 2002-09-12 05:51:42 richard Exp $ __doc__ = ''' About Gadfly ============ @@ -1409,7 +1409,7 @@ class Class(hyperdb.Class): otherwise a KeyError is raised. ''' if not self.key: - raise TypeError, 'No key property set' + raise TypeError, 'No key property set for class %s'%self.classname cursor = self.db.conn.cursor() sql = 'select id from _%s where _%s=?'%(self.classname, self.key)