mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
toJSON: re-throw serialization exception
(cherry picked from commit 4a2310a3a0
)
This commit is contained in:
parent
85a4f62400
commit
4bf020de50
4 changed files with 17 additions and 1 deletions
8
tests/functional/lang/eval-fail-toJSON-non-utf-8.err.exp
Normal file
8
tests/functional/lang/eval-fail-toJSON-non-utf-8.err.exp
Normal 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
|
1
tests/functional/lang/eval-fail-toJSON-non-utf-8.nix
Normal file
1
tests/functional/lang/eval-fail-toJSON-non-utf-8.nix
Normal file
|
@ -0,0 +1 @@
|
|||
builtins.toJSON "_invalid UTF-8: ÿ_"
|
Loading…
Add table
Add a link
Reference in a new issue