1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-01-04 04:38:12 -06:00

Windows: Display source location of errors in order to help diagnose issues reported by users

This commit is contained in:
Mounir IDRASSI
2015-07-05 18:15:41 +02:00
parent c3b77fba25
commit 724043be0b
23 changed files with 270 additions and 227 deletions

View File

@@ -22,6 +22,10 @@
#include <io.h>
#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;
}