mirror of
https://github.com/irmen/prog8.git
synced 2024-11-02 22:04:40 +00:00
fix superfluous printing of WARN/ERROR words
This commit is contained in:
parent
520a142992
commit
9874fe2c23
@ -1 +1 @@
|
||||
8.0
|
||||
8.1-dev
|
||||
|
@ -29,12 +29,12 @@ internal class ErrorReporter: IErrorReporter {
|
||||
MessageSeverity.WARNING -> System.out
|
||||
MessageSeverity.ERROR -> System.err
|
||||
}
|
||||
when(it.severity) {
|
||||
MessageSeverity.ERROR -> printer.print("\u001b[91mERROR\u001B[0m ") // bright red
|
||||
MessageSeverity.WARNING -> printer.print("\u001b[93mWARN\u001B[0m ") // bright yellow
|
||||
}
|
||||
val msg = "${it.position.toClickableStr()} ${it.message}".trim()
|
||||
if(msg !in alreadyReportedMessages) {
|
||||
when(it.severity) {
|
||||
MessageSeverity.ERROR -> printer.print("\u001b[91mERROR\u001B[0m ") // bright red
|
||||
MessageSeverity.WARNING -> printer.print("\u001b[93mWARN\u001B[0m ") // bright yellow
|
||||
}
|
||||
printer.println(msg)
|
||||
alreadyReportedMessages.add(msg)
|
||||
when(it.severity) {
|
||||
|
Loading…
Reference in New Issue
Block a user