mirror of
https://github.com/NixOS/nix
synced 2025-06-30 11:43:15 +02:00
refactor: Extract EvalState::{runDebugRepl,canDebug}
This commit is contained in:
parent
da82d67022
commit
c07500e14d
4 changed files with 37 additions and 15 deletions
|
@ -73,12 +73,7 @@ EvalErrorBuilder<T>::addTrace(PosIdx pos, std::string_view formatString, const A
|
|||
template<class T>
|
||||
void EvalErrorBuilder<T>::debugThrow()
|
||||
{
|
||||
if (error.state.debugRepl && !error.state.debugTraces.empty()) {
|
||||
const DebugTrace & last = error.state.debugTraces.front();
|
||||
const Env * env = &last.env;
|
||||
const Expr * expr = &last.expr;
|
||||
error.state.runDebugRepl(&error, *env, *expr);
|
||||
}
|
||||
error.state.runDebugRepl(&error);
|
||||
|
||||
// `EvalState` is the only class that can construct an `EvalErrorBuilder`,
|
||||
// and it does so in dynamic storage. This is the final method called on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue