thSoft / elysium

LilyPond IDE for Eclipse
http://elysium.thsoft.hu
14 stars 3 forks source link

Problem parsing minimal #179

Closed nittka closed 6 years ago

nittka commented 6 years ago

This PR tries to improve LilyPond compile error parsing. The error stream is redirected (see java doc) so that messages will not get lost, even if errors were somehow globally redirected to the regular output. The second change is adding the encoding to the locale - otherwise the output remained English even though the locale was German.

Testet on a Windows and a Linux system, to be confirmed on Mac.

These two commits should not be problematc. I still think that the Problem parser should not depend on the locale directly. As seen by #178, even though the locale may be set, LilyPond could use a different language. This language should be inferred directly from the console output.

nittka commented 6 years ago

A further issue may be (missing) exception handling in CancellableProcessUtils, line 53. An exception when processing a single line should not kill the entire thread (rather log the exception to the log and proceed?)

nittka commented 6 years ago

An exception thrown in the thread will not be caught by the surrounding try catch. I log the individual exceptions directly. If you object (possibly too many exceptions logged), we could restrict the number of exceptions logged, or collect them all, log the first completely and only the messages for the remaining ones.

thSoft commented 6 years ago

Yes, these all improve the robustness of the problem parsing, thanks!