lib/generators: fix error message

This commit is contained in:
Maximilian Bosch 2021-09-28 22:26:51 +02:00
parent b96101a35f
commit 681758d415
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E

View File

@ -197,7 +197,7 @@ rec {
withRecursion =
args@{
/* If this option is not null, `toPretty` will stop evaluating at a certain depth */
/* If this option is not null, the given value will stop evaluating at a certain depth */
depthLimit
/* If this option is true, an error will be thrown, if a certain given depth is exceeded */
, throwOnDepthLimit ? true
@ -207,7 +207,7 @@ rec {
transform = depth:
if depthLimit != null && depth > depthLimit then
if throwOnDepthLimit
then throw "Exceeded maximum eval-depth limit of ${toString depthLimit} while trying to pretty-print with `generators.withRecursion'!"
then throw "Exceeded maximum eval-depth limit of ${toString depthLimit} while trying to evaluate with `generators.withRecursion'!"
else const "<unevaluated>"
else id;
mapAny = with builtins; depth: v: