VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Format.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/Common/Format.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/Common/Format.c')
-rw-r--r--src/Common/Format.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Common/Format.c b/src/Common/Format.c
index 3ebfef1e..14c91a33 100644
--- a/src/Common/Format.c
+++ b/src/Common/Format.c
@@ -31,6 +31,10 @@
#include <Strsafe.h>
+#ifndef SRC_POS
+#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
+#endif
+
int FormatWriteBufferSize = 1024 * 1024;
static uint32 FormatSectorSize = 0;
@@ -286,7 +290,7 @@ begin_format:
}
else
{
- handleWin32Error (volParams->hwndDlg);
+ handleWin32Error (volParams->hwndDlg, SRC_POS);
Error ("CANT_ACCESS_VOL", hwndDlg);
nStatus = ERR_DONT_REPORT;
goto error;
@@ -893,7 +897,7 @@ static void __cdecl FormatWriteThreadProc (void *arg)
{
if (WaitForSingleObject (WriteBufferFullEvent, INFINITE) == WAIT_FAILED)
{
- handleWin32Error (NULL);
+ handleWin32Error (NULL, SRC_POS);
break;
}
@@ -907,7 +911,7 @@ static void __cdecl FormatWriteThreadProc (void *arg)
if (!SetEvent (WriteBufferEmptyEvent))
{
- handleWin32Error (NULL);
+ handleWin32Error (NULL, SRC_POS);
break;
}
}