1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-01-08 10:13:28 +08:00

Improve Error() shim.

This commit is contained in:
Nick Hastings 2022-09-04 13:06:09 -04:00
parent c5627090f7
commit 2f2e51520a
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ========//
//===== Copyright <EFBFBD> 1996-2005, Valve Corporation, All rights reserved. ========//
//
// Purpose:
//
@ -252,7 +252,7 @@ inline void Error( const tchar* pMsg, ... )
va_start(params, pMsg);
V_vsnprintf(szBuffer, sizeof(szBuffer), pMsg, params);
va_end(params);
LoggingSystem_LogDirect(LOG_GENERAL, LS_ERROR, szBuffer);
Plat_FatalErrorFunc( "%s", szBuffer );
}
// @TODO: these callstack spew functions are currently disabled in the new logging system. Need to add support for these if desired.

View File

@ -1129,6 +1129,8 @@ PLATFORM_INTERFACE void Plat_ExitProcess( int nCode );
PLATFORM_INTERFACE bool Plat_ShouldCollectMiniDumpsForFatalErrors();
PLATFORM_INTERFACE void Plat_FatalErrorFunc( const tchar* pMsg, ... ) FMTFUNCTION( 1, 2 );
// b/w compatibility
#define Sys_FloatTime Plat_FloatTime