Pgsql::Connection::connect functions now all report connection errors
by throwing exception.
This commit is contained in:
parent
05bca069e3
commit
c5f6da48ce
5 changed files with 35 additions and 39 deletions
|
|
@ -48,11 +48,7 @@ TypeSelectionItemModel* OpenDatabase::typeSelectionModel()
|
|||
void OpenDatabase::refresh()
|
||||
{
|
||||
Pgsql::Connection conn;
|
||||
std::string connstr = m_config.connectionString().toStdString();
|
||||
if (conn.connect(connstr.c_str())) {
|
||||
m_catalog->loadAll(conn, nullptr);
|
||||
}
|
||||
else {
|
||||
qDebug() << "Connect failed connstr: " << connstr.c_str();
|
||||
}
|
||||
auto connstr = m_config.connectionString();
|
||||
conn.connect(connstr);
|
||||
m_catalog->loadAll(conn, nullptr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue