Source

south_oracle-fixes / raise_databaseerror.diff

# HG changeset patch
# Parent e4c8d335477d2e67005b555b53264e08f34fe880
Raise a DatabaseError, as Oracle code expects, instead of exiting.

diff --git a/south/db/generic.py b/south/db/generic.py
--- a/south/db/generic.py
+++ b/south/db/generic.py
@@ -216,9 +216,10 @@
         try:
             cursor.execute(sql, params)
         except DatabaseError, e:
-            print >> sys.stderr, 'FATAL ERROR - The following SQL query failed: %s' % sql
-            print >> sys.stderr, 'The error was: %s' % e
-            sys.exit(1)
+#            print >> sys.stderr, 'FATAL ERROR - The following SQL query failed: %s' % sql
+#            print >> sys.stderr, 'The error was: %s' % e
+            # Code that calls this may depend on this exception being raised.
+            raise
 
         try:
             return cursor.fetchall()