include flavor in missing `readValue` error (#86)
This commit is contained in:
parent
da49e0e0c5
commit
c869dae884
|
@ -328,10 +328,13 @@ proc readValue*[T](r: var JsonReader, value: var T)
|
||||||
flavorUsesAutomaticObjectSerialization(Flavor)
|
flavorUsesAutomaticObjectSerialization(Flavor)
|
||||||
|
|
||||||
when not isAutomatic:
|
when not isAutomatic:
|
||||||
const typeName = typetraits.name(T)
|
const
|
||||||
{.error: "Please override readValue for the " &
|
flavor =
|
||||||
typeName &
|
"JsonReader[" & typetraits.name(typeof(r).Flavor) & "], " &
|
||||||
" type (or import the module where the override is provided)".}
|
typetraits.name(T)
|
||||||
|
{.error:
|
||||||
|
"Missing Json serialization import or implementation for readValue(" &
|
||||||
|
flavor & ")".}
|
||||||
|
|
||||||
readRecordValue(r, value)
|
readRecordValue(r, value)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue