Better error reporting of problems during catalog load.
This commit is contained in:
parent
2a29bed75e
commit
c37e9eccb8
2 changed files with 24 additions and 15 deletions
|
|
@ -109,8 +109,11 @@ void load(Pgsql::Connection &conn, IPgContainter &pg_cont)
|
|||
Pgsql::Result result = conn.query(q.c_str());
|
||||
if (result && result.resultStatus() == PGRES_TUPLES_OK)
|
||||
pg_cont.load(result);
|
||||
else
|
||||
throw std::runtime_error("Query failed");
|
||||
else {
|
||||
auto details = result.diagDetails();
|
||||
|
||||
throw std::runtime_error("Query failed\n" + details.errorMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue