Page MenuHomePhabricator

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

Description

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:

Just return "Unable to compile LilyPond input file"

Event Timeline

Addshore triaged this task as Normal priority.

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

.../file.ly:12:9: error: unrecognized string, not in text script or \lyricmode
	
        safkjsanfkjsfjsafsaf

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)

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

https://gerrit.wikimedia.org/r/491261

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

https://gerrit.wikimedia.org/r/491261

hashar added a subscriber: hashar.Feb 27 2019, 4:22 PM

I have reverted the patch due to T217241