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();
|
String fileName = ex.getCodeFile().getPrettyName();
|
||||||
int lineNum = ex.getCodeLine() + 1;
|
int lineNum = ex.getCodeLine() + 1;
|
||||||
int colNum = ex.getCodeColumn();
|
int colNum = ex.getCodeColumn();
|
||||||
if (colNum != -1) {
|
String column = (colNum != -1) ? (":" + colNum) : "";
|
||||||
s = fileName + ":" + lineNum + ":" + colNum + ": error: " + error + msg;
|
s = fileName + ":" + lineNum + column + ": error: " + error + msg;
|
||||||
} else {
|
|
||||||
s = fileName + ":" + lineNum + ": error: " + error + msg;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ex != null) {
|
if (ex != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user