From d17392bc451bc770ccf42e0540adcdc9f4da3daf Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 20 Nov 2018 10:00:37 -0800 Subject: [PATCH] Port Resolve C26496 compiler errors when building in release mode with VS 15.9 (#4141) --- .../src/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp | 2 +- .../src/AspNetCoreModuleV2/CommonLib/BaseOutputManager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IISIntegration/src/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp b/src/IISIntegration/src/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp index 36b0c2d902..4ce20f893d 100644 --- a/src/IISIntegration/src/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp +++ b/src/IISIntegration/src/AspNetCoreModuleV2/AspNetCore/applicationinfo.cpp @@ -106,7 +106,7 @@ APPLICATION_INFO::CreateApplication(IHttpContext& pHttpContext) } return S_OK; } - catch (ConfigurationLoadException &ex) + catch (const ConfigurationLoadException &ex) { EventLog::Error( ASPNETCORE_CONFIGURATION_LOAD_ERROR, diff --git a/src/IISIntegration/src/AspNetCoreModuleV2/CommonLib/BaseOutputManager.h b/src/IISIntegration/src/AspNetCoreModuleV2/CommonLib/BaseOutputManager.h index 32706b0192..7e0834584b 100644 --- a/src/IISIntegration/src/AspNetCoreModuleV2/CommonLib/BaseOutputManager.h +++ b/src/IISIntegration/src/AspNetCoreModuleV2/CommonLib/BaseOutputManager.h @@ -55,7 +55,7 @@ protected: { func(); } - catch (std::runtime_error& exception) + catch (const std::runtime_error& exception) { EventLog::Warn(ASPNETCORE_EVENT_GENERAL_WARNING, exceptionMessage.c_str(), GetModuleName().c_str(), to_wide_string(exception.what(), GetConsoleOutputCP()).c_str()); }