Catch IO_ERROR thrown in timestamp gen

Missing nickname can throw when generating a timestamp, this should be
caught and prevent further work in the footprint loading (the entry does
not exist)

Fixes https://gitlab.com/kicad/code/kicad/issues/13029
This commit is contained in:
Seth Hillbrand 2022-11-29 14:07:33 -08:00
parent 4f4e355ce5
commit 1a670f4673
1 changed files with 9 additions and 1 deletions

View File

@ -98,7 +98,15 @@ bool FOOTPRINT_LIST_IMPL::CatchErrors( const std::function<void()>& aFunc )
bool FOOTPRINT_LIST_IMPL::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* aNickname,
PROGRESS_REPORTER* aProgressReporter )
{
long long int generatedTimestamp = aTable->GenerateTimestamp( aNickname );
long long int generatedTimestamp = 0;
if( !CatchErrors( [&]()
{
generatedTimestamp = aTable->GenerateTimestamp( aNickname );
} ) )
{
return false;
}
if( generatedTimestamp == m_list_timestamp )
return true;