Add exception for not being able to connect to MySQL, make use of it to pop up an error box

This commit is contained in:
Eric Blade
2009-10-09 07:31:25 -04:00
parent 971a282383
commit ee864033ee
3 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ class fpdb_db:
try:
self.db = MySQLdb.connect(host = host, user = user, passwd = password, db = database, use_unicode=True)
except:
raise FpdbError("MySQL connection failed")
raise FpdbMySQLFailedError("MySQL connection failed")
elif backend==fpdb_db.PGSQL:
import psycopg2
import psycopg2.extensions