From c0ffec2fd1add50dae44c9e73a3c47d7d3998d15 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 2 Mar 2009 15:42:21 +0100 Subject: database: db_load() returns GError Do error reporting with GLib's GError library. --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 1b84f68b9..cad9e5904 100644 --- a/src/main.c +++ b/src/main.c @@ -94,6 +94,7 @@ openDB(const Options *options) { const char *path = config_get_path(CONF_DB_FILE); bool ret; + GError *error = NULL; if (!mapper_has_music_directory()) { if (path != NULL) @@ -112,8 +113,11 @@ openDB(const Options *options) /* don't attempt to load the old database */ return false; - ret = db_load(); + ret = db_load(&error); if (!ret) { + g_warning("Failed to load database: %s", error->message); + g_error_free(error); + if (options->createDB < 0) g_error("can't open db file and using " "\"--no-create-db\" command line option"); -- cgit v1.2.3