Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.10.0 broke at least the Bear project #2953

Closed
yurivict opened this issue Aug 18, 2021 · 2 comments
Closed

3.10.0 broke at least the Bear project #2953

yurivict opened this issue Aug 18, 2021 · 2 comments
Labels
kind: bug solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@yurivict
Copy link

https://github.com/rizsotto/Bear

[ 73% 54/61] Building CXX object citnames/CMakeFiles/citnames_json_a.dir/source/Output.cc.o
FAILED: citnames/CMakeFiles/citnames_json_a.dir/source/Output.cc.o
/usr/bin/c++ -DFMT_SHARED -DJSON_DIAGNOSTICS=0 -DJSON_USE_IMPLICIT_CONVERSIONS=1 -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -I. -I/wrkdirs/usr/ports/devel/bear/work/Bear-3.0.13/source/libresult/include -I/wrkdirs/usr/ports/devel/bear/work/Bear-3.0.13/source/libshell/include -I/wrkdirs/usr/ports/devel/bear/work/Bear-3.0.13/source/libsys/include -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fno-exceptions -DSPDLOG_NO_EXCEPTIONS -DGOOGLE_PROTOBUF_NO_RTTI -Wall -Wextra -O3 -DNDEBUG -fexceptions -std=c++17 -MD -MT citnames/CMakeFiles/citnames_json_a.dir/source/Output.cc.o -MF citnames/CMakeFiles/citnames_json_a.dir/source/Output.cc.o.d -o citnames/CMakeFiles/citnames_json_a.dir/source/Output.cc.o -c /wrkdirs/usr/ports/devel/bear/work/Bear-3.0.13/source/citnames/source/Output.cc
/wrkdirs/usr/ports/devel/bear/work/Bear-3.0.13/source/citnames/source/Output.cc:187:19: error: no matching function for call to 'create'
            throw nlohmann::json::out_of_range::create(403, "key 'command' or 'arguments' not found");
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/nlohmann/detail/exceptions.hpp:379:25: note: candidate function template not viable: requires 3 arguments, but 2 were provided
    static out_of_range create(int id_, const std::string& what_arg, const BasicJsonType& context)
                        ^
1 error generated.
@nlohmann
Copy link
Owner

The function out_of_range::create is part of the was never meant to be called by client code, but is an internal helper function for the library to create exceptions.

Its signature was changed to realize the newly introduced extended diagnostics and now requires a third parameter context which can be used to derived a JSON Pointer from. In most cases, this is a JSON value that can help the user to better locate the exception. In case such a value does not exist, pass json() as a default value.

I am sorry for the inconvenience.

@yurivict
Copy link
Author

Ok, thanks.

@nlohmann nlohmann added the solution: proposed fix a fix for the issue has been proposed and waits for confirmation label Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants