mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-21 10:52:14 +01:00
Slightly simplify error message rebuilding
This removes some duplicate code for with and without column number by building the column number string separately first.
This commit is contained in:
parent
8e9f7a630a
commit
e387c23b60
@ -582,11 +582,8 @@ public class Compiler implements MessageConsumer {
|
||||
String fileName = ex.getCodeFile().getPrettyName();
|
||||
int lineNum = ex.getCodeLine() + 1;
|
||||
int colNum = ex.getCodeColumn();
|
||||
if (colNum != -1) {
|
||||
s = fileName + ":" + lineNum + ":" + colNum + ": error: " + error + msg;
|
||||
} else {
|
||||
s = fileName + ":" + lineNum + ": error: " + error + msg;
|
||||
}
|
||||
String column = (colNum != -1) ? (":" + colNum) : "";
|
||||
s = fileName + ":" + lineNum + column + ": error: " + error + msg;
|
||||
}
|
||||
|
||||
if (ex != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user