[Gnucash-changes] r14232 - gnucash/trunk/src - Move the
error-handling of failure to initialize the engine from
Chris Shoemaker
chris at cvs.gnucash.org
Mon May 29 00:52:23 EDT 2006
Author: chris
Date: 2006-05-29 00:52:23 -0400 (Mon, 29 May 2006)
New Revision: 14232
Trac: http://svn.gnucash.org/trac/changeset/14232
Modified:
gnucash/trunk/src/bin/gnucash-bin.c
gnucash/trunk/src/engine/gnc-engine.c
Log:
Move the error-handling of failure to initialize the engine from
gnc-engine.c to gnucash-bin.c. This allows tests that call
gnc_engine_init() but fail to find a backend to still pass.
Modified: gnucash/trunk/src/bin/gnucash-bin.c
===================================================================
--- gnucash/trunk/src/bin/gnucash-bin.c 2006-05-29 01:47:48 UTC (rev 14231)
+++ gnucash/trunk/src/bin/gnucash-bin.c 2006-05-29 04:52:23 UTC (rev 14232)
@@ -373,7 +373,11 @@
gnc_module_load_optional(modules[i].name, modules[i].version);
else
gnc_module_load(modules[i].name, modules[i].version);
- }
+ }
+ if (!gnc_engine_is_initialized()) {
+ g_error("GnuCash engine failed to initialize. Exiting.\n");
+ exit(0);
+ }
}
static void
Modified: gnucash/trunk/src/engine/gnc-engine.c
===================================================================
--- gnucash/trunk/src/engine/gnc-engine.c 2006-05-29 01:47:48 UTC (rev 14231)
+++ gnucash/trunk/src/engine/gnc-engine.c 2006-05-29 04:52:23 UTC (rev 14232)
@@ -115,9 +115,7 @@
/* If this is a required library, stop now! */
if (lib->required)
{
- g_message("required library %s not found. Exiting.\n",
- lib->lib);
- g_assert(FALSE);
+ g_message("required library %s not found.\n", lib->lib);
}
}
}
More information about the gnucash-changes
mailing list