Closed iwanders closed 1 year ago
Failure here seems unrelated to these changes?
Use of uninitialized value $Clang in concatenation (.) or string at /usr/bin/scan-build line 1859.
sh: 1: : Permission denied
scan-build: error: Cannot find an executable 'clang' relative to scan-build. Consider using --use-analyzer to pick a version of 'clang' to use for static analysis.
gmake[3]: *** [CMakeFiles/ci_clang_analyze.dir/build.make:72: CMakeFiles/ci_clang_analyze] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:1143: CMakeFiles/ci_clang_analyze.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:1150: CMakeFiles/ci_clang_analyze.dir/rule] Error 2
gmake: *** [Makefile:465: ci_clang_analyze] Error 2
Error: Process completed with exit code 2.
Thanks!
Hi,
The core guidelines recommend catching by
const&
for all but very small value types. One of my colleagues filed a PR internally withcatch (nlohmann::json::type_error& e)
, instead ofcatch (const nlohmann::json::type_error& e)
, with the explanation that it was copied from the documentation. The error here holds a string however, so it is not a simple type that fits in a single register, I thinkconst &
is appropriate. This PR updates the documentation's exception catching to be all const.Automated replace performed with the following command:
Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmann
directory, runmake amalgamate
to create the single-header filessingle_include/nlohmann/json.hpp
andsingle_include/nlohmann/json_fwd.hpp
. The whole process is described here.