Skip to content

Commit ca242d5

Browse files
author
Avi SZYCHTER
committed
Added +1 for line count when shown through warning and errors
1 parent df9756d commit ca242d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/ParsingUtils.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
void throwError(const std::string& category, const std::string& description,
1010
unsigned long long line) {
1111
throw CANDatabaseException(
12-
category + ": " + description + " at line " + std::to_string(line)
12+
category + ": " + description + " at line " + std::to_string(line + 1)
1313
);
1414
}
1515

1616
void warning(const std::string& description, unsigned long long line) {
17-
std::cout << "WARNING: "
17+
std::cerr << "WARNING: "
1818
<< description
1919
<< " at line "
20-
<< line
20+
<< line + 1
2121
<< std::endl;
2222
}
2323

0 commit comments

Comments
 (0)