Bugfix 797045 - Correct error message when connection to database failed

This is to fix the defect https://bugs.gnucash.org/show_bug.cgi?id=797045
Error type chaged to ERR_BACKEND_CANT_CONNECT in gnc-backend-dbi.cpp when connection to database failed
This commit is contained in:
Kanstantin K. 2024-09-28 08:44:01 +02:00 committed by Kanstantin Kachanouski
parent 6aeca0040e
commit d0b210a6df

View File

@ -708,7 +708,7 @@ GncDbiBackend<Type>::session_begin (QofSession* session, const char* new_uri,
else if (m_exists)
{
PERR ("Unable to connect to database '%s'\n", uri.dbname());
set_error (ERR_BACKEND_SERVER_ERR);
set_error (ERR_BACKEND_CANT_CONNECT);
dbi_conn_close(conn);
LEAVE("Error");
return;