Report location of FUTURE_FORMAT_ERRORs when reading footprints.

This commit is contained in:
Jeff Young 2024-03-15 22:47:00 +00:00
parent d17151ac1b
commit a4062ade3d
1 changed files with 3 additions and 4 deletions

View File

@ -196,10 +196,7 @@ void FP_CACHE::Load()
wxString fpName = fn.GetName();
if( !footprint )
{
THROW_IO_ERROR( wxString::Format( _( "Unable to read file '%s'" ),
fn.GetFullPath() ) );
}
THROW_IO_ERROR( wxEmptyString ); // caught locally, just below...
footprint->SetFPID( LIB_ID( wxEmptyString, fpName ) );
m_footprints.insert( fpName, new FP_CACHE_ITEM( footprint, fn ) );
@ -209,6 +206,8 @@ void FP_CACHE::Load()
if( !cacheError.IsEmpty() )
cacheError += wxT( "\n\n" );
cacheError += wxString::Format( _( "Unable to read file '%s'" ) + '\n',
fn.GetFullPath() );
cacheError += ioe.What();
}
} while( dir.GetNext( &fullName ) );