mirror of
https://github.com/irmen/prog8.git
synced 2025-01-12 19:29:50 +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.WARNING -> System.out
|
||||||
MessageSeverity.ERROR -> System.err
|
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()
|
val msg = "${it.position.toClickableStr()} ${it.message}".trim()
|
||||||
if(msg !in alreadyReportedMessages) {
|
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)
|
printer.println(msg)
|
||||||
alreadyReportedMessages.add(msg)
|
alreadyReportedMessages.add(msg)
|
||||||
when(it.severity) {
|
when(it.severity) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user