Question about type_error::create #3566
-
I'm looking at the following piece of code
You will notice that create has two arguments. All the documentation I see online shows only two arguments But the definition in exceptiobs.hpp seems to show three arguments
Visual studio 2019 generates an error Can someone explain what is going on and how to fix it? I thought I was using 3.10.5 but the documentation seems to say 3.10.2 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
What exactly are you trying to do? Please provide more context.
Where are you seeing this? Creating exceptions is not documented at all, to my knowledge.
Based on this code, you're not using 3.10.5 but
Where in the library is this error occurring? If it's not library code that is throwing this |
Beta Was this translation helpful? Give feedback.
-
So, It seems like my problem is that the original code that I am trying to modify tried to throw an exception of type "type_error" which is unsupported. Should user code be trying to throw any type of nlohmann::json exception? I suspect not. The JSON.hpp has the following: Licensed under the MIT License https://opensource.org/licenses/MIT. Are you sure that I am using develop? |
Beta Was this translation helpful? Give feedback.
What exactly are you trying to do? Please provide more context.
Where are you seeing this? Creating exceptions is not documented at all, to my knowledge.
Based on this code, you're not using 3.10.5 but
develop
. In 3.10.5 the third parameter is of typeconst BasicJsonType &
.