diff options
| author | Jason Kirtland <jek@discorporate.us> | 2007-08-11 23:15:32 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2007-08-11 23:15:32 +0000 |
| commit | 2d8b5bb4f36e5624f25b170391fe42d3bfbeb623 (patch) | |
| tree | a6267f998e2c54ef3d1405d23bd3a6a1618280ef /lib/sqlalchemy/engine/base.py | |
| parent | 2fbeeb125c83664d684cfabdfa8548d518e758a6 (diff) | |
| download | sqlalchemy-2d8b5bb4f36e5624f25b170391fe42d3bfbeb623.tar.gz | |
Added an exception hierarchy shadowing DB-API exc types
No more generic SQLErrors wrappers- the shadow type matching the DB-API error is raised. [ticket:706]
SQLError is now (also) DBAPIError.
DBAPIError and subtype constructors will refuse to wrap a SystemExit or KeyboardInterrupt, returningthe original interrupt exception instead of a new instance. [ticket:689]
Added a passthroughs for SE/KI exceptions in a couple except-and-discard situations
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
| -rw-r--r-- | lib/sqlalchemy/engine/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 78eb0922e..a4e41e996 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1183,7 +1183,8 @@ class ResultProxy(object): rec = (type, type.dialect_impl(self.dialect), i) if rec[0] is None: - raise exceptions.DBAPIError("None for metadata " + colname) + raise exceptions.InvalidRequestError( + "None for metadata " + colname) if self.__props.setdefault(colname.lower(), rec) is not rec: self.__props[colname.lower()] = (type, ResultProxy.AmbiguousColumn(colname), 0) self.__keys.append(colname) |
