1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Merge pull request #12127 from NaN-git/json-ser

toJSON: re-throw serialization exception
This commit is contained in:
Robert Hensing 2024-12-31 21:41:38 +01:00 committed by GitHub
commit 4f3960ea26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,8 @@
error:
… while calling the 'toJSON' builtin
at /pwd/lang/eval-fail-toJSON-non-utf-8.nix:1:1:
1| builtins.toJSON "_invalid UTF-8: ÿ_"
| ^
2|
error: JSON serialization error: [json.exception.type_error.316] invalid UTF-8 byte at index 16: 0xFF

View file

@ -0,0 +1 @@
builtins.toJSON "_invalid UTF-8: ÿ_"