diff options
Diffstat (limited to 'src/test/DUtilUnitTest/error.h')
| -rw-r--r-- | src/test/DUtilUnitTest/error.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/test/DUtilUnitTest/error.h b/src/test/DUtilUnitTest/error.h index a52db56d..b973acaf 100644 --- a/src/test/DUtilUnitTest/error.h +++ b/src/test/DUtilUnitTest/error.h | |||
| @@ -1,8 +1,14 @@ | |||
| 1 | #pragma once | ||
| 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 | // 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 | ||
| 3 | const int ERROR_STRING_BUFFER = 1024; | 4 | #define DUTIL_SOURCE_DEFAULT DUTIL_SOURCE_EXTERNAL |
| 4 | 5 | ||
| 5 | static char szMsg[ERROR_STRING_BUFFER]; | 6 | void CALLBACK DutilTestTraceError( |
| 6 | static WCHAR wzMsg[ERROR_STRING_BUFFER]; | 7 | __in_z LPCSTR szFile, |
| 7 | 8 | __in int iLine, | |
| 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))); } | 9 | __in REPORT_LEVEL rl, |
| 10 | __in UINT source, | ||
| 11 | __in HRESULT hrError, | ||
| 12 | __in_z __format_string LPCSTR szFormat, | ||
| 13 | __in va_list args | ||
| 14 | ); | ||
