From 2d8b5bb4f36e5624f25b170391fe42d3bfbeb623 Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Sat, 11 Aug 2007 23:15:32 +0000 Subject: 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 --- lib/sqlalchemy/engine/default.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/engine/default.py') diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index a9ee02c1c..f7410bb0f 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -136,7 +136,8 @@ class DefaultDialect(base.Dialect): # to appropriate character upon compilation self.positional = True else: - raise exceptions.DBAPIError("Unsupported paramstyle '%s'" % self._paramstyle) + raise exceptions.InvalidRequestError( + "Unsupported paramstyle '%s'" % self._paramstyle) def _get_ischema(self): if self._ischema is None: -- cgit v1.2.1