mirror of
https://github.com/NixOS/nix
synced 2025-07-01 00:07:58 +02:00
Print value on type error
Adds the failing value to `value is <TYPE> while a <TYPE> is expected` error messages.
This commit is contained in:
parent
b74ec56da9
commit
cb7fbd4d83
19 changed files with 227 additions and 136 deletions
|
@ -49,4 +49,16 @@ struct PrintOptions
|
|||
size_t maxStringLength = std::numeric_limits<size_t>::max();
|
||||
};
|
||||
|
||||
/**
|
||||
* `PrintOptions` for unknown and therefore potentially large values in error messages,
|
||||
* to avoid printing "too much" output.
|
||||
*/
|
||||
static PrintOptions errorPrintOptions = PrintOptions {
|
||||
.ansiColors = true,
|
||||
.maxDepth = 10,
|
||||
.maxAttrs = 10,
|
||||
.maxListItems = 10,
|
||||
.maxStringLength = 1024
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue