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 f6f99e45b9
commit f974c8259e
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,12 @@ void SPICE_LIBRARY_PARSER::parseFile( const wxString &aFilePath, REPORTER& aRepo
{
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>() )
{