[glom] Frame_Glom: attempt_toggle_shared(): Abort if db startup failed.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Frame_Glom: attempt_toggle_shared(): Abort if db startup failed.
- Date: Mon, 11 Nov 2013 11:26:00 +0000 (UTC)
commit 3988c34fe0e95d4019f7b40987b8a7f062765bc2
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Nov 11 12:22:49 2013 +0100
Frame_Glom: attempt_toggle_shared(): Abort if db startup failed.
* glom/frame_glom.cc: Do not try to continue if re-startup
failed, though I have never seen this problem happen.
glom/frame_glom.cc | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 72b9049..7386b84 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -982,11 +982,14 @@ bool Frame_Glom::attempt_toggle_shared(bool shared)
ShowProgressMessage startup_message(_("Starting Database Server"));
connectionpool->set_network_shared(sigc::mem_fun(*this, &Frame_Glom::on_connection_startup_progress),
shared);
- ConnectionPool::StartupErrors started = connectionpool->startup( sigc::mem_fun(*this,
&Frame_Glom::on_connection_startup_progress) );
+ const ConnectionPool::StartupErrors started =
+ connectionpool->startup( sigc::mem_fun(*this, &Frame_Glom::on_connection_startup_progress) );
if(started != ConnectionPool::Backend::STARTUPERROR_NONE)
{
+ //TODO: Output more exact details of the error message.
+ //TODO: Recover somehow?
std::cerr << G_STRFUNC << ": startup() failed." << std::endl;
- //TODO: Tell the user.
+ return false;
}
connectionpool->set_ready_to_connect();
@@ -2093,6 +2096,7 @@ bool Frame_Glom::connection_request_password_and_choose_new_database_name()
if(started != ConnectionPool::Backend::STARTUPERROR_NONE)
{
std::cerr << G_STRFUNC << ": startup() failed." << std::endl;
+ //TODO: Output more exact details of the error message.
return false;
}
@@ -2253,6 +2257,7 @@ bool Frame_Glom::connection_request_password_and_attempt(bool& database_not_foun
{
std::cerr << G_STRFUNC << ": startup() failed." << std::endl;
return false;
+ //TODO: Output more exact details of the error message.
}
AppWindow* app = dynamic_cast<AppWindow*>(get_app_window());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]