Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 1b8c762

Browse files
committed
handle windows path in error message normalize
1 parent 74b0484 commit 1b8c762

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/c_api/c_api_error.cc

+7
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ std::string NormalizeError(std::string err_msg) {
8787
// get filename
8888
while (is.peek() == ' ') is.get();
8989
if (!getline(is, file_name, ':')) return false;
90+
else {
91+
if (is.peek() == '\\') {
92+
// windows path
93+
if (!getline(is, line, ':')) return false;
94+
file_name = file_name + ':' + line;
95+
}
96+
}
9097
// get line number
9198
if (!(is >> line_number)) return false;
9299
// get rest of the message.

0 commit comments

Comments
 (0)