From 8e81ece9e37a71e36e3d8bdb444d3cd22dc67d1f Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 7 Dec 2016 11:54:42 +0100 Subject: [PATCH] Some extra diagnostic output added when configuration XML contains unknown/unsupported method --- lib/TTLS/src/Config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/TTLS/src/Config.cpp b/lib/TTLS/src/Config.cpp index 6ff015a..bfb54ca 100644 --- a/lib/TTLS/src/Config.cpp +++ b/lib/TTLS/src/Config.cpp @@ -269,7 +269,7 @@ eap::config_method_with_cred* eap::config_method_ttls::make_config_method(_In_ w case eap_type_ttls : return new config_method_ttls (m_module, m_level + 1); case eap_type_legacy_pap : return new config_method_pap (m_module, m_level + 1); case eap_type_legacy_mschapv2: return new config_method_mschapv2(m_module, m_level + 1); - default : throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method."); + default : throw invalid_argument(string_printf(__FUNCTION__ " Unsupported inner authentication method (%d).", eap_type)); } } @@ -280,7 +280,7 @@ eap::config_method_with_cred* eap::config_method_ttls::make_config_method(_In_ c else if (_wcsicmp(eap_type, L"EAP-TTLS") == 0) return new config_method_ttls (m_module, m_level + 1); else if (_wcsicmp(eap_type, L"PAP" ) == 0) return new config_method_pap (m_module, m_level + 1); else if (_wcsicmp(eap_type, L"MSCHAPv2") == 0) return new config_method_mschapv2(m_module, m_level + 1); - else throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method."); + else throw invalid_argument(string_printf(__FUNCTION__ " Unsupported inner authentication method (%ls).", eap_type)); }