summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-01-17 20:16:15 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-01-17 20:16:19 +0100
commit6556c61586d79ee0ae599248f25d591d99da8a97 (patch)
tree5392d273386dbf868e7ca2cb9b680c700bb7a4e0 /tools
parente9cf5c17fe55779628503718139f3048b6eab5d2 (diff)
downloadmsitools-6556c61586d79ee0ae599248f25d591d99da8a97.tar.gz
msitools-6556c61586d79ee0ae599248f25d591d99da8a97.tar.xz
msitools-6556c61586d79ee0ae599248f25d591d99da8a97.zip
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.
Diffstat (limited to 'tools')
-rw-r--r--tools/msiinfo.c5
1 files changed, 2 insertions, 3 deletions
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;
}