Skip to content

Commit

Permalink
nixd/AST: handle exceptions for getValueEval
Browse files Browse the repository at this point in the history
  • Loading branch information
inclyc committed Aug 11, 2023
1 parent a26a47f commit ee5c495
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nixd/lib/AST/EvalAST.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ EvalAST::getValueEval(const nix::Expr *Expr,
if (!OpVAncestor)
return std::nullopt;

forceValueDepth(State, *OpVAncestor, 2);
// TODO: add tests
try {
forceValueDepth(State, *OpVAncestor, 2);
} catch (...) {
}
return getValue(Expr);
}

Expand Down

0 comments on commit ee5c495

Please sign in to comment.