konsoletyper / teavm-flavour

Framework for writing client-side applications using TeaVM
Apache License 2.0
110 stars 19 forks source link

Parsing error reporting #48

Closed ScraM-Team closed 4 years ago

ScraM-Team commented 4 years ago

In a large project, it is hard to tell the source of errors in Flavour output, since filenames are missing in some cases.

This change provides more detail in error logs. Now HTML errors from jericho, and EL parsing errors include a filename. Example of the new output:

[INFO] Running TeaVM
Jun 06, 2020 7:09:31 PM net.htmlparser.jericho.LoggerProviderJava$JavaLogger error
SEVERE: **com.example.Client**: StartTag at (r6,c1,p144) missing required end tag
[INFO] Output file built with errors
[INFO] Debug information successfully written
[INFO] Source maps successfully written
[INFO] Source files successfully written
[ERROR] **templates/client.html**: Variable noSuchField was not found

The old output just said this, no filenames or classes:

[INFO] Running TeaVM
Jun 06, 2020 6:55:02 PM net.htmlparser.jericho.LoggerProviderJava$JavaLogger error
SEVERE: StartTag at (r6,c1,p144) missing required end tag
ScraM-Team commented 4 years ago

This one had extra files, I created a correct PR with just one commit.