mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
if no errLoc, no Loc.
This commit is contained in:
parent
3629b0585a
commit
a295b2ea96
1 changed files with 4 additions and 2 deletions
|
@ -94,8 +94,10 @@ std::optional<LinesOfCode> getCodeLines(const ErrPos &errPos)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (EndOfFile &eof) {
|
catch (EndOfFile &eof) {
|
||||||
// TODO: return maybe partial loc?
|
if (loc.errLineOfCode.has_value())
|
||||||
return std::nullopt;
|
return loc;
|
||||||
|
else
|
||||||
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
catch (std::exception &e) {
|
catch (std::exception &e) {
|
||||||
printError("error reading nix file: %s\n%s", errPos.file, e.what());
|
printError("error reading nix file: %s\n%s", errPos.file, e.what());
|
||||||
|
|
Loading…
Reference in a new issue