[MusicXML import] replace assertions by proper error reporting

• Feb 7, 2021 - 09:44
Reported version
3.6
Type
Functional
Severity
S5 - Suggestion
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

The MusicXML parser contains several assertions checking start and end elements to verify the parser is still in sync. For end users they have no effect (resulting in incomplete import without any error), for a debug build they crash MuseScore when triggered.

Suggestion is to properly report "parser out of sync" to the end user and provide meaningful information (e.g. expected element name and type versus actual) to the developer.

Relates to #270643: [EPIC] MusicXML import/export issues


Comments