spice_library_parser: catch an exception thrown when a spice model cannot be built.

Fixes #15012
https://gitlab.com/kicad/code/kicad/-/issues/15012
This commit is contained in:
jean-pierre charras 2023-06-20 10:19:57 +02:00
parent 7d6cb4e77b
commit a9fff82664
1 changed files with 7 additions and 1 deletions

View File

@ -159,7 +159,13 @@ void SPICE_LIBRARY_PARSER::parseFile( const wxString &aFilePath, REPORTER& aRepo
}
catch( const IO_ERROR& e )
{
aReporter.Report( e.What(), RPT_SEVERITY_ERROR );
aReporter.Report( e.What(), RPT_SEVERITY_ERROR );
}
catch( ... )
{
aReporter.Report( wxString::Format( _( "Cannot create sim model from %s" ),
model ),
RPT_SEVERITY_ERROR );
}
}
else if( node->is_type<SIM_LIBRARY_SPICE_PARSER::dotInclude>() )