diff options
Diffstat (limited to 'src/nix/flake.cc')
-rw-r--r-- | src/nix/flake.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc index 0da9b1ce9..a11e39534 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -808,10 +808,10 @@ struct CmdFlakeInitCommon : virtual Args, EvalCommand auto templateDir = templateDirAttr->getString(); if (!store->isInStore(templateDir)) - throw TypeError( + evalState->error<TypeError>( "'%s' was not found in the Nix store\n" "If you've set '%s' to a string, try using a path instead.", - templateDir, templateDirAttr->getAttrPathStr()); + templateDir, templateDirAttr->getAttrPathStr()).debugThrow(); std::vector<Path> changedFiles; std::vector<Path> conflictedFiles; @@ -1281,7 +1281,7 @@ struct CmdFlakeShow : FlakeCommand, MixJSON { auto aType = visitor.maybeGetAttr("type"); if (!aType || aType->getString() != "app") - throw EvalError("not an app definition"); + state->error<EvalError>("not an app definition").debugThrow(); if (json) { j.emplace("type", "app"); } else { |