Page MenuHomePhabricator

Return nice error messages from Score extension when Lilypond formatting fails
Closed, ResolvedPublic


Score by default returns a rather large error message when it can't format the value.
Instead of returning that to the user we want to return a single string i18n message.

Instead of:

image.png (418×674 px, 32 KB)

Just return "Unable to compile LilyPond input file"

Event Timeline

Addshore triaged this task as Medium priority.Feb 5 2019, 4:21 PM
Addshore created this task.

The current error message is not user-friendly indeed, but dropping the line

.../ error: unrecognized string, not in text script or \lyricmode

would make finding the error a lot harder, so this should be preserved somehow (the best would be to convert the line/column numbers so that they correspond to the position of the error in the wikitext).

I came up with this so far.. it looks nicer and more concise (the code is the opposite 😄 but will try to improve some stuff)

image.png (226×525 px, 14 KB)

Change 491261 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Score@master] beautify lilypond error message output

Change 491261 merged by jenkins-bot:
[mediawiki/extensions/Score@master] beautify lilypond error message output