VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/SelfExtract.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-05 18:15:41 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-06 01:19:21 +0200
commit724043be0b9ed68382c49c54b4750ddeaebe81c4 (patch)
treef93ab6d2b1597b9fd2c3c354f0c730b805cc3c57 /src/Setup/SelfExtract.c
parentc3b77fba25539c433c882d980169f2c68329e996 (diff)
downloadVeraCrypt-724043be0b9ed68382c49c54b4750ddeaebe81c4.tar.gz
VeraCrypt-724043be0b9ed68382c49c54b4750ddeaebe81c4.zip
Windows: Display source location of errors in order to help diagnose issues reported by users
Diffstat (limited to 'src/Setup/SelfExtract.c')
-rw-r--r--src/Setup/SelfExtract.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Setup/SelfExtract.c b/src/Setup/SelfExtract.c
index a4acde26..3ebaf5e6 100644
--- a/src/Setup/SelfExtract.c
+++ b/src/Setup/SelfExtract.c
@@ -20,6 +20,10 @@
#include "Resource.h"
#include <Strsafe.h>
+#ifndef SRC_POS
+#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
+#endif
+
#define OutputPackageFile "VeraCrypt Setup " VERSION_STRING ".exe"
#define MAG_START_MARKER "TCINSTRT"
@@ -252,7 +256,7 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, char *szDestDir)
if (!TCCopyFile (inputFile, outputFile))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
PkgError ("Cannot copy 'VeraCrypt Setup.exe' to the package");
goto err;
}
@@ -435,7 +439,7 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, char *szDestDir)
if (tmpBuffer == NULL)
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
if (remove (outputFile))
PkgError ("Cannot load the package to compute CRC.\nFailed also to delete package file");
else
@@ -720,7 +724,7 @@ void __cdecl ExtractAllFilesThread (void *hwndDlg)
{
wchar_t szTmp[TC_MAX_PATH];
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("CANT_CREATE_FOLDER"), DestExtractPath);
MessageBoxW (hwndDlg, szTmp, lpszTitle, MB_ICONHAND);
bSuccess = FALSE;