Type checking failure / weird resolution #3982
Closed
oskarirauta
started this conversation in
General
Replies: 2 comments 4 replies
-
Which line throws the exception? |
Beta Was this translation helpful? Give feedback.
4 replies
-
Resolved by @gregmarr user error due to typo :D |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
data contains following:
{"color":"#96C2E5","font":"regular","size":23,"spacing":3}
and type is
nlohmann::json
Here's the code:
and here's result:
My validation routine is long, so partially including it only. For part that causes the problem.
If I comment out that section, program works as expected (except that it no longer checks that valid format was used on behalf on value types).
My program supports few functions; like msg, img and shape. If I use different functions, different kind of properties are required.. And tested.
With image type I got result that must be string, but is null and commenting out this made it go through:
Why would value need to be anything there? Or why exception, when string doesn't have anything to do with that. Or with msg, so what if something is null - we return our own error then to caller..
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions