VIEW_LIB_FRAME: catch exceptions for invalid libraries
This commit is contained in:
parent
a4b962e7d9
commit
75d9a18fc0
|
@ -495,7 +495,11 @@ bool LIB_VIEW_FRAME::ReCreateListCmp()
|
||||||
|
|
||||||
wxArrayString aliasNames;
|
wxArrayString aliasNames;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
Prj().SchSymbolLibTable()->EnumerateSymbolLib( m_libraryName, aliasNames, m_listPowerCmpOnly );
|
Prj().SchSymbolLibTable()->EnumerateSymbolLib( m_libraryName, aliasNames, m_listPowerCmpOnly );
|
||||||
|
}
|
||||||
|
catch( const IO_ERROR& e ) {} // ignore, it is handled below
|
||||||
|
|
||||||
if( aliasNames.IsEmpty() )
|
if( aliasNames.IsEmpty() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -193,7 +193,13 @@ void LIB_VIEW_FRAME::DisplayLibInfos()
|
||||||
void LIB_VIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
|
void LIB_VIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
|
||||||
{
|
{
|
||||||
LIB_ID id( m_libraryName, m_entryName );
|
LIB_ID id( m_libraryName, m_entryName );
|
||||||
LIB_ALIAS* entry = Prj().SchSymbolLibTable()->LoadSymbol( id );
|
LIB_ALIAS* entry = nullptr;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
entry = Prj().SchSymbolLibTable()->LoadSymbol( id );
|
||||||
|
}
|
||||||
|
catch( const IO_ERROR& e ) {} // ignore, it is handled below
|
||||||
|
|
||||||
if( !entry )
|
if( !entry )
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue