Commit 1942e64d by Mathijs van de Nes Committed by Victor M. Alvarez

Display line number even if filename is unknown (#31)

When rules are passed as strings, the line number would not be shown
when input as a string. The information is available however.
parent b26fe50e
......@@ -1650,7 +1650,8 @@ void raise_exception_on_error(
else
PyErr_Format(
YaraSyntaxError,
"%s",
"line %d: %s",
line_number,
message);
}
}
......@@ -1675,7 +1676,8 @@ void raise_exception_on_error_or_warning(
else
PyErr_Format(
YaraSyntaxError,
"%s",
"line %d: %s",
line_number,
message);
}
else
......@@ -1690,7 +1692,8 @@ void raise_exception_on_error_or_warning(
else
PyErr_Format(
YaraWarningError,
"%s",
"line %d: %s",
line_number,
message);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment