Print the value in `error: cannot coerce` messages
(cherry picked from commit 5b7bfd2d6b89d7dd5f54c1ca6c8072358d31a84e)
===
test taken from 6e8d5983143ae576e3f4b1d2954a5267f2943a49; it was added
previously (and not backported because its pr was a mostly-revert), but
it's useful to have around.
Change-Id: Icbd14b55e3610ce7b774667bf14b82e6dc717982
25 lines
636 B
Markdown
25 lines
636 B
Markdown
---
|
|
synopsis: Coercion errors include the failing value
|
|
issues: #561
|
|
prs: #9754
|
|
---
|
|
|
|
The `error: cannot coerce a <TYPE> to a string` message now includes the value
|
|
which caused the error.
|
|
|
|
Before:
|
|
|
|
```
|
|
error: cannot coerce a set to a string
|
|
```
|
|
|
|
After:
|
|
|
|
```
|
|
error: cannot coerce a set to a string: { aesSupport = «thunk»;
|
|
avx2Support = «thunk»; avx512Support = «thunk»; avxSupport = «thunk»;
|
|
canExecute = «thunk»; config = «thunk»; darwinArch = «thunk»; darwinMinVersion
|
|
= «thunk»; darwinMinVersionVariable = «thunk»; darwinPlatform = «thunk»; «84
|
|
attributes elided»}
|
|
```
|