1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

Initial frames support

This commit is contained in:
Guillaume Maudoux 2022-10-17 03:05:02 +02:00
parent 3f9f6ae127
commit b945b844a9
5 changed files with 63 additions and 13 deletions

View file

@ -110,6 +110,7 @@ void printAtPos(const ErrPos & pos, std::ostream & out);
struct Trace {
std::optional<ErrPos> pos;
hintformat hint;
bool frame;
};
struct ErrorInfo {
@ -188,7 +189,7 @@ public:
addTrace(e, hintfmt(std::string(fs), args...));
}
void addTrace(std::optional<ErrPos> e, hintformat hint);
void addTrace(std::optional<ErrPos> e, hintformat hint, bool frame = false);
bool hasTrace() const { return !err.traces.empty(); }
};