From 13b097396bb2ce05d688a16f674712e5428b2ce0 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 2 Nov 2022 12:32:46 +0000 Subject: [PATCH] More explicit error message for unnumbered pins. --- .../netlist_reader/board_netlist_updater.cpp | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/pcbnew/netlist_reader/board_netlist_updater.cpp b/pcbnew/netlist_reader/board_netlist_updater.cpp index 56c325ef24..f2ef340ad3 100644 --- a/pcbnew/netlist_reader/board_netlist_updater.cpp +++ b/pcbnew/netlist_reader/board_netlist_updater.cpp @@ -842,16 +842,26 @@ bool BOARD_NETLIST_UPDATER::testConnectivity( NETLIST& aNetlist, { padNumber = component->GetNet( jj ).GetPinName(); - if( footprint->FindPadByNumber( padNumber ) ) - continue; // OK, pad found - - // not found: bad footprint, report error - msg.Printf( _( "%s pad %s not found in %s." ), - component->GetReference(), - padNumber, - footprint->GetFPID().Format().wx_str() ); - m_reporter->Report( msg, RPT_SEVERITY_ERROR ); - ++m_errorCount; + if( padNumber.IsEmpty() ) + { + // bad symbol, report error + msg.Printf( _( "Symbol %s has pins with no number. These pins can not be matched " + "to pads in %s." ), + component->GetReference(), + footprint->GetFPID().Format().wx_str() ); + m_reporter->Report( msg, RPT_SEVERITY_ERROR ); + ++m_errorCount; + } + else if( !footprint->FindPadByNumber( padNumber ) ) + { + // not found: bad footprint, report error + msg.Printf( _( "%s pad %s not found in %s." ), + component->GetReference(), + padNumber, + footprint->GetFPID().Format().wx_str() ); + m_reporter->Report( msg, RPT_SEVERITY_ERROR ); + ++m_errorCount; + } } }