diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-07-11 21:11:30 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-07-12 11:51:29 +1000 |
| commit | 9c4b5559ccb55491fe68b0096d1be0496fd6fcc7 (patch) | |
| tree | faa51204fc2e6e3dfd1b00ae03c7184c4fb0b4bf /src/test/DUtilUnitTest/error.h | |
| parent | f651268309263fa67fa84caf9fb6dbebb5c900d9 (diff) | |
| download | wix-9c4b5559ccb55491fe68b0096d1be0496fd6fcc7.tar.gz wix-9c4b5559ccb55491fe68b0096d1be0496fd6fcc7.tar.bz2 wix-9c4b5559ccb55491fe68b0096d1be0496fd6fcc7.zip | |
Import DUtilUnitTest from old wix4 repo.
Diffstat (limited to 'src/test/DUtilUnitTest/error.h')
| -rw-r--r-- | src/test/DUtilUnitTest/error.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/DUtilUnitTest/error.h b/src/test/DUtilUnitTest/error.h new file mode 100644 index 00000000..a52db56d --- /dev/null +++ b/src/test/DUtilUnitTest/error.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | const int ERROR_STRING_BUFFER = 1024; | ||
| 4 | |||
| 5 | static char szMsg[ERROR_STRING_BUFFER]; | ||
| 6 | static WCHAR wzMsg[ERROR_STRING_BUFFER]; | ||
| 7 | |||
| 8 | #define ExitTrace(x, f, ...) { HRESULT hrTemp = x; hr = ::StringCchPrintfA(szMsg, countof(szMsg), f, __VA_ARGS__); MultiByteToWideChar(CP_ACP, 0, szMsg, -1, wzMsg, countof(wzMsg)); throw gcnew System::Exception(System::String::Format("hr = 0x{0:X8}, message = {1}", hrTemp, gcnew System::String(wzMsg))); } | ||
