From 7e8f35109725ed3fd3caf96acf8b94a13c53fdfe Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 9 Feb 2011 18:11:40 -0500 Subject: - Non-DBAPI errors which occur in the scope of an `execute()` call are now wrapped in sqlalchemy.exc.StatementError, and the text of the SQL statement and repr() of params is included. This makes it easier to identify statement executions which fail before the DBAPI becomes involved. [ticket:2015] --- test/dialect/test_postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/dialect/test_postgresql.py') diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index 9aa281979..10067a669 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -993,7 +993,7 @@ class DomainReflectionTest(TestBase, AssertsExecutionResults): : try: con.execute(ddl) - except exc.SQLError, e: + except exc.DBAPIError, e: if not 'already exists' in str(e): raise e con.execute('CREATE TABLE testtable (question integer, answer ' -- cgit v1.2.1