Don't match to an unknown layer.
This commit is contained in:
parent
9ba9f0288e
commit
7877e4083e
|
@ -189,7 +189,18 @@ DRC_SELECTOR* DRC_RULES_PARSER::parseDRC_SELECTOR( wxString* aRuleName )
|
|||
|
||||
case T_match_layer:
|
||||
NeedSYMBOL();
|
||||
selector->m_MatchLayers.push_back( m_layerMap[ curText ] );
|
||||
|
||||
if( m_layerMap.count( curText ) )
|
||||
{
|
||||
selector->m_MatchLayers.push_back( m_layerMap[ curText ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
wxString errText = wxString::Format( _( "Layer \"%s\" not found." ),
|
||||
wxString( curText ) );
|
||||
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
|
||||
}
|
||||
|
||||
NeedRIGHT();
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue