summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-25 18:29:00 -0500
committerDan McGee <dan@archlinux.org>2011-08-28 19:52:41 -0500
commit2cfcc874b9332ad207398b9e20dc8880d93e8ae4 (patch)
tree6276468d8aa91c6e8546704a5c92166752c01ac6 /src/util
parentdc3336c27728fc16d2f9e68cb818648e7ca88467 (diff)
Better error handling out of package load method
There are many other ways to fail a package load other than "file not found". We should also use the correct error code in this case. Clean it up a bit in the various callers. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/testpkg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/testpkg.c b/src/util/testpkg.c
index ac2dde28..90758e16 100644
--- a/src/util/testpkg.c
+++ b/src/util/testpkg.c
@@ -63,6 +63,9 @@ int main(int argc, char *argv[])
|| pkg == NULL) {
err = alpm_errno(handle);
switch(err) {
+ case ALPM_ERR_PKG_NOT_FOUND:
+ printf("Cannot find the given file.\n");
+ break;
case ALPM_ERR_PKG_OPEN:
printf("Cannot open the given file.\n");
break;