changeset 480:e60d9192bfaa

preserve exception on connections
author Catherine Devlin <catherine.devlin@gmail.com>
date Wed, 19 May 2010 15:13:44 -0400
parents 99734f5dded5
children 7e72a5f6a94b
files sqlpython/pgSession.txt sqlpython/sqlpython.py
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/pgSession.txt	Thu Mar 18 16:35:19 2010 -0400
+++ b/sqlpython/pgSession.txt	Wed May 19 15:13:44 2010 -0400
@@ -8,7 +8,7 @@
 /.*/
 SQL.No_Connection> set colors off
 /.*/
-SQL.No_Connection> connect --postgres --password=testpassword testplatform testuser
+SQL.No_Connection> connect --postgres --password=testpass00word testplatform testuser
 0:testuser@testplatform> drop table play;
 /.*/
 
--- a/sqlpython/sqlpython.py	Thu Mar 18 16:35:19 2010 -0400
+++ b/sqlpython/sqlpython.py	Wed May 19 15:13:44 2010 -0400
@@ -154,8 +154,9 @@
 
         try:
             db_instance = connections.DatabaseInstance(arg, opts, default_rdbms = self.default_rdbms)
-        except:
+        except Exception, e:
             self.perror('Connection failure.\n' + self.do_connect.__doc__)
+            self.perror(str(e))
             return
         if opts.add or (self.instance_number is None):
             try: