From 724043be0b9ed68382c49c54b4750ddeaebe81c4 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 5 Jul 2015 18:15:41 +0200 Subject: Windows: Display source location of errors in order to help diagnose issues reported by users --- src/Common/Password.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/Common/Password.c') diff --git a/src/Common/Password.c b/src/Common/Password.c index 3ae264d2..b3dd54bb 100644 --- a/src/Common/Password.c +++ b/src/Common/Password.c @@ -22,6 +22,10 @@ #include +#ifndef SRC_POS +#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__)) +#endif + void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword, HWND hVerify, unsigned char *szPassword, char *szVerify, @@ -160,14 +164,14 @@ int ChangePwd (const char *lpszVolume, Password *oldPassword, int old_pkcs5, int if ((wipePassCount <= 0) || (truecryptMode && (old_pkcs5 == SHA256))) { nStatus = ERR_PARAMETER_INCORRECT; - handleError (hwndDlg, nStatus); + handleError (hwndDlg, nStatus, SRC_POS); return nStatus; } if (!lpszVolume) { nStatus = ERR_OUTOFMEMORY; - handleError (hwndDlg, nStatus); + handleError (hwndDlg, nStatus, SRC_POS); return nStatus; } @@ -451,7 +455,7 @@ error: return nStatus; if (nStatus != 0) - handleError (hwndDlg, nStatus); + handleError (hwndDlg, nStatus, SRC_POS); return nStatus; } -- cgit v1.2.3