EDA_SHAPE_DESC(): catch a std::runtime_error when emitted by
template<typename T> T Get( PROPERTY_BASE* aProperty ) to avoid a crash, and displays in Debug mode the runtime error message. From master branch. Fixes #14347 https://gitlab.com/kicad/code/kicad/issues/14347
This commit is contained in:
parent
1dc9583e06
commit
a65accd412
|
@ -1736,7 +1736,17 @@ static struct EDA_SHAPE_DESC
|
||||||
filled->SetAvailableFunc(
|
filled->SetAvailableFunc(
|
||||||
[=]( INSPECTABLE* aItem ) -> bool
|
[=]( INSPECTABLE* aItem ) -> bool
|
||||||
{
|
{
|
||||||
SHAPE_T itemShape = aItem->Get<SHAPE_T>( shape );
|
SHAPE_T itemShape;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
itemShape = aItem->Get<SHAPE_T>( shape );
|
||||||
|
}
|
||||||
|
catch( std::runtime_error& err )
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( err.what() );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch( itemShape )
|
switch( itemShape )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue