From 9e9db8bd4dafda6fad9e68c9452bfb2d5933d4ea Mon Sep 17 00:00:00 2001 From: Ian McInerney <ian.s.mcinerney@ieee.org> Date: Thu, 20 Feb 2025 13:44:43 +0000 Subject: [PATCH] Make tool framework assert more useful --- common/tool/action_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index 9a79f69d77..26592724c1 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -79,7 +79,8 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) wxASSERT( aAction->GetName().find( '.', 0 ) != std::string::npos ); // TOOL_ACTIONs must have unique names & ids - wxASSERT( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end() ); + wxASSERT_MSG( m_actionNameIndex.find( aAction->m_name ) == m_actionNameIndex.end(), + wxString::Format( "Action '%s' already registered", aAction->m_name ) ); m_actionNameIndex[aAction->m_name] = aAction;