Re: [Kicad-developers] [PATCH] pcbnew crashes when loading file with bad net ID

2015-06-08 Thread Wayne Stambaugh
Chris, I committed this patch with a minor change to make the exception message a bit more understandable. Thanks, Wayne On 6/7/2015 7:24 PM, Chris Pavlina wrote: If you try to load a kicad_pcb into pcbnew that refers to an invalid net ID, pcbnew crashes after failing an assertion. It

[Kicad-developers] [PATCH] pcbnew crashes when loading file with bad net ID

2015-06-07 Thread Chris Pavlina
If you try to load a kicad_pcb into pcbnew that refers to an invalid net ID, pcbnew crashes after failing an assertion. It should display an error indicating that the file is corrupt instead. I've changed BOARD_CONNECTED_ITEM::SetNetCode() to be able to indicate whether the code was valid,

Re: [Kicad-developers] [PATCH] pcbnew crashes when loading file with bad net ID

2015-06-07 Thread Wayne Stambaugh
Expecting() raises an exception. I would rather use THROW_IO_ERROR() to tell the user not only where the offending net code is in the file but also that it is an offending net code that is the issue. Expecting() should be used when there is an invalid token or expected value type. In this case