Display a nice error message instead of asserting
When we mess up, it will be nice to not lose users' data. This requests a bug report if the netlist parsing breaks instead of throwing
This commit is contained in:
parent
8a305eec32
commit
e0011fcd93
|
@ -1451,10 +1451,16 @@ bool PCB_EDIT_FRAME::FetchNetlistFromSchematic( NETLIST& aNetlist,
|
|||
KICAD_NETLIST_READER netlistReader( lineReader, &aNetlist );
|
||||
netlistReader.LoadNetlist();
|
||||
}
|
||||
catch( const IO_ERROR& )
|
||||
catch( const IO_ERROR& e )
|
||||
{
|
||||
Raise();
|
||||
assert( false ); // should never happen
|
||||
|
||||
// Do not translate extra_info strings. These are for developers
|
||||
wxString extra_info = e.Problem() + " : " + e.What() + " at " + e.Where();
|
||||
|
||||
DisplayErrorMessage( this, _( "Received an error while reading netlist. Please "
|
||||
"report this issue to the KiCad team using the menu "
|
||||
"Help->Report Bug."), extra_info );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue