Error reporting for missing ltspice symbol (.asy) files.

This commit is contained in:
Jeff Young 2023-06-26 21:59:57 +01:00
parent 29d2265c01
commit aa8dbc03a2
1 changed files with 6 additions and 1 deletions

View File

@ -463,7 +463,12 @@ void LTSPICE_SCHEMATIC::removeCarriageReturn( wxString& elementFromLine )
LTSPICE_SCHEMATIC::LT_SYMBOL LTSPICE_SCHEMATIC::SymbolBuilder( const wxString& aAscFileName,
LT_ASC& aAscFile )
{
return SymbolBuilder( aAscFileName, m_fileCache[ wxS( "asyFiles" ) ][ aAscFileName ], aAscFile );
const std::map<wxString, wxString>& asyFiles = m_fileCache[ wxS( "asyFiles" ) ];
if( !asyFiles.count( aAscFileName ) )
THROW_IO_ERROR( wxString::Format( _( "Symbol '%s.asy' not found" ), aAscFileName ) );
return SymbolBuilder( aAscFileName, asyFiles.at( aAscFileName ), aAscFile );
}
LTSPICE_SCHEMATIC::LT_SYMBOL LTSPICE_SCHEMATIC::SymbolBuilder( const wxString& aAscFileName,