summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/error.c')
-rw-r--r--lib/libalpm/error.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index 4d4a065c..d893f866 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -29,12 +29,12 @@
#include "alpm.h"
#include "handle.h"
-const char SYMEXPORT *alpm_strerrorlast(void)
+enum _pmerrno_t SYMEXPORT alpm_errno(pmhandle_t *handle)
{
- return alpm_strerror(pm_errno);
+ return handle->pm_errno;
}
-const char SYMEXPORT *alpm_strerror(int err)
+const char SYMEXPORT *alpm_strerror(enum _pmerrno_t err)
{
switch(err) {
/* System */
@@ -137,8 +137,6 @@ const char SYMEXPORT *alpm_strerror(int err)
/* Miscellaenous */
case PM_ERR_RETRIEVE:
return _("failed to retrieve some files");
- case PM_ERR_WRITE:
- return _("failed to copy some file");
case PM_ERR_INVALID_REGEX:
return _("invalid regular expression");
/* Errors from external libraries- our own wrapper error */
@@ -148,12 +146,7 @@ const char SYMEXPORT *alpm_strerror(int err)
* error string instead. */
return _("libarchive error");
case PM_ERR_LIBCURL:
-#ifdef HAVE_LIBCURL
- return curl_easy_strerror(handle->curlerr);
-#else
- /* obviously shouldn't get here... */
return _("download library error");
-#endif
case PM_ERR_GPGME:
return _("gpgme error");
case PM_ERR_EXTERNAL_DOWNLOAD: