Commit ddd5b0a4 authored by Allan McRae's avatar Allan McRae
Browse files

Add file and line number to RET_ERR{,_VOID}



Following the example of the recently added GOTO_ERR, adding the file and
line number in addition to the function name in our debug messages is
potentially useful.
Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
parent 80ae8014
......@@ -62,12 +62,12 @@ void _alpm_alloc_fail(size_t size);
#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0)
#define RET_ERR_VOID(handle, err) do { \
_alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerror(err)); \
_alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s (%s: %d) : %s\n", err, __func__, __FILE__, __LINE__, alpm_strerror(err)); \
(handle)->pm_errno = (err); \
return; } while(0)
#define RET_ERR(handle, err, ret) do { \
_alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerror(err)); \
_alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s (%s: %d) : %s\n", err, __func__, __FILE__, __LINE__, alpm_strerror(err)); \
(handle)->pm_errno = (err); \
return (ret); } while(0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment