From 6556c61586d79ee0ae599248f25d591d99da8a97 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 17 Jan 2013 20:16:15 +0100 Subject: Remove LIBMSI_RESULT_NO_MORE_ITEMS from API Raising an error for indicating the end of the results is really inconvenient, it's like throwing an exception for something quite normal... The user can still make a distinction when there is an error if the GError is set. --- tools/msiinfo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/msiinfo.c b/tools/msiinfo.c index 4dcaeca..55bf8ca 100644 --- a/tools/msiinfo.c +++ b/tools/msiinfo.c @@ -122,7 +122,6 @@ static void print_libmsi_error(LibmsiResultError r) case LIBMSI_RESULT_CALL_NOT_IMPLEMENTED: fprintf(stderr, "%s: not implemented\n", program_name); exit(1); - case LIBMSI_RESULT_NO_MORE_ITEMS: case LIBMSI_RESULT_NOT_FOUND: fprintf(stderr, "%s: not found\n", program_name); exit(1); @@ -180,7 +179,7 @@ static void print_strings_from_query(LibmsiQuery *query, GError **error) g_object_unref(rec); } - if (!g_error_matches(err, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_NO_MORE_ITEMS)) + if (err) g_propagate_error(error, err); g_clear_error(&err); @@ -640,7 +639,7 @@ static gboolean export_sql( LibmsiDatabase *db, const char *table, GError **erro } } - if (!g_error_matches(err, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_NO_MORE_ITEMS)) { + if (err) { g_propagate_error(error, err); success = FALSE; } -- cgit