diff --git a/common/io/eagle/eagle_parser.cpp b/common/io/eagle/eagle_parser.cpp index 8653e35b8e..85edd1b9d4 100644 --- a/common/io/eagle/eagle_parser.cpp +++ b/common/io/eagle/eagle_parser.cpp @@ -392,7 +392,9 @@ T parseRequiredAttribute( wxXmlNode* aNode, const wxString& aAttribute ) if( aNode->GetAttribute( aAttribute, &value ) ) return Convert( value ); else - throw XML_PARSER_ERROR( "The required attribute " + aAttribute + " is missing." ); + throw XML_PARSER_ERROR( "The required attribute " + aAttribute + " is missing at " + "line " + wxString::Format( "%d", aNode->GetLineNumber() ) + + "." ); } @@ -1294,8 +1296,8 @@ EMODEL::EMODEL( wxXmlNode* aModel, IO_BASE* aIo ) : * name %String; #REQUIRED * > */ - model = aModel->GetNodeContent(); name = parseRequiredAttribute( aModel, "name" ); + model = aModel->GetNodeContent(); AdvanceProgressPhase(); } @@ -1352,7 +1354,9 @@ ESPICE::ESPICE( wxXmlNode* aSpice, IO_BASE* aIo ) : * */ pinmapping = std::move( std::make_unique( aSpice ) ); - model = std::move( std::make_unique( aSpice ) ); + + if( aSpice->GetName() == "model" ) + model = std::move( std::make_unique( aSpice ) ); AdvanceProgressPhase(); } @@ -1481,8 +1485,13 @@ EPART::EPART( wxXmlNode* aPart, IO_BASE* aIo ) : */ name = parseRequiredAttribute( aPart, "name" ); library = parseRequiredAttribute( aPart, "library" ); + libraryUrn = parseOptionalAttribute( aPart, "library_urn" ); deviceset = parseRequiredAttribute( aPart, "deviceset" ); device = parseRequiredAttribute( aPart, "device" ); + package3d_urn = parseOptionalAttribute( aPart, "package3d_urn" ); + override_package3d_urn = parseOptionalAttribute( aPart, "override_package3d_urn" ); + override_package_urn = parseOptionalAttribute( aPart, "override_package_urn" ); + override_locally_modified = parseOptionalAttribute( aPart, "override_locally_modified" ); technology = parseOptionalAttribute( aPart, "technology" ); value = parseOptionalAttribute( aPart, "value" ); @@ -2311,8 +2320,8 @@ EPACKAGE3D::EPACKAGE3D( wxXmlNode* aPackage3d, IO_BASE* aIo ) : name = parseRequiredAttribute( aPackage3d, "name" ); urn = parseRequiredAttribute( aPackage3d, "urn" ); type = parseRequiredAttribute( aPackage3d, "type" ); - library_version = parseRequiredAttribute( aPackage3d, "alibrary_version" ); - library_locally_modified = parseRequiredAttribute( aPackage3d, + library_version = parseOptionalAttribute( aPackage3d, "library_version" ); + library_locally_modified = parseOptionalAttribute( aPackage3d, "library_locally_modified" ); for( wxXmlNode* child = aPackage3d->GetChildren(); child; child = child->GetNext() ) @@ -2650,8 +2659,6 @@ EDRAWING::EDRAWING( wxXmlNode* aDrawing, IO_BASE* aIo ) : */ for( wxXmlNode* child = aDrawing->GetChildren(); child; child = child->GetNext() ) { - wxLogDebug( wxS( "Eagle 'drawing' child node '%s'." ), child->GetName() ); - if( child->GetName() == "settings" ) { for( wxXmlNode* setting = child->GetChildren(); setting; setting = setting->GetNext() )