lib/gvariant: Fix error message for unsupported primitives

Without this, passing an integer to a setting will fail with a confusing error:

    error: cannot coerce an integer to a string
This commit is contained in:
Jan Tojnar 2024-05-01 00:02:45 +02:00
parent 5b2b3b8558
commit 96e6f1a418
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ rec {
else if isGVariant v then
v
else
throw "The GVariant type of ${v} can't be inferred.";
throw "The GVariant type of ${builtins.typeOf v} can't be inferred.";
/* Returns the GVariant array from the given type of the elements and a Nix list.