From 7f642e51670bc38a4ef782a363936850bc2b0ba9 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 22 Apr 2021 06:38:23 -0700 Subject: Move dutil into libs/dutil --- src/test/DUtilUnitTest/error.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 src/test/DUtilUnitTest/error.cpp (limited to 'src/test/DUtilUnitTest/error.cpp') diff --git a/src/test/DUtilUnitTest/error.cpp b/src/test/DUtilUnitTest/error.cpp deleted file mode 100644 index e51971c3..00000000 --- a/src/test/DUtilUnitTest/error.cpp +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -#include "precomp.h" - -const int ERROR_STRING_BUFFER = 1024; - -static char szMsg[ERROR_STRING_BUFFER]; -static WCHAR wzMsg[ERROR_STRING_BUFFER]; - -void CALLBACK DutilTestTraceError( - __in_z LPCSTR /*szFile*/, - __in int /*iLine*/, - __in REPORT_LEVEL /*rl*/, - __in UINT source, - __in HRESULT hrError, - __in_z __format_string LPCSTR szFormat, - __in va_list args - ) -{ - if (DUTIL_SOURCE_EXTERNAL == source) - { - ::StringCchPrintfA(szMsg, countof(szMsg), szFormat, args); - MultiByteToWideChar(CP_ACP, 0, szMsg, -1, wzMsg, countof(wzMsg)); - throw gcnew System::Exception(System::String::Format("hr = 0x{0:X8}, message = {1}", hrError, gcnew System::String(wzMsg))); - } -} -- cgit v1.2.3-55-g6feb