aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/get-drvs.cc
diff options
context:
space:
mode:
authorGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-04 21:47:58 +0100
committerGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-04 21:47:58 +0100
commit3a5855353e5dc2986c38bb66eaff5538dea70da1 (patch)
treef21f14e5e959b8ce68cc8045db3e98911587d8fb /src/libexpr/get-drvs.cc
parentbe1f0697468bd6c0f2be4f7e058270c161098e9f (diff)
Add detailed error mesage for coerceTo{String,Path}
Diffstat (limited to 'src/libexpr/get-drvs.cc')
-rw-r--r--src/libexpr/get-drvs.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc
index 975490d36..9bb545430 100644
--- a/src/libexpr/get-drvs.cc
+++ b/src/libexpr/get-drvs.cc
@@ -74,7 +74,7 @@ std::optional<StorePath> DrvInfo::queryDrvPath() const
if (i == attrs->end())
drvPath = {std::nullopt};
else
- drvPath = {state->coerceToStorePath(*i->pos, *i->value, context)};
+ drvPath = {state->coerceToStorePath(*i->pos, *i->value, context, "Whyle evaluating the drv path of a DrvInfo")};
}
return drvPath.value_or(std::nullopt);
}
@@ -94,7 +94,7 @@ StorePath DrvInfo::queryOutPath() const
Bindings::iterator i = attrs->find(state->sOutPath);
PathSet context;
if (i != attrs->end())
- outPath = state->coerceToStorePath(*i->pos, *i->value, context);
+ outPath = state->coerceToStorePath(*i->pos, *i->value, context, "While evaluating the output path of a DrvInfo");
}
if (!outPath)
throw UnimplementedError("CA derivations are not yet supported");
@@ -122,7 +122,7 @@ DrvInfo::Outputs DrvInfo::queryOutputs(bool onlyOutputsToInstall)
Bindings::iterator outPath = out->value->attrs->find(state->sOutPath);
if (outPath == out->value->attrs->end()) continue; // FIXME: throw error?
PathSet context;
- outputs.emplace(name, state->coerceToStorePath(*outPath->pos, *outPath->value, context));
+ outputs.emplace(name, state->coerceToStorePath(*outPath->pos, *outPath->value, context, "While evaluating the outPath of an output path of a DrvInfo"));
}
} else
outputs.emplace("out", queryOutPath());