mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-19 22:39:09 +00:00
Replace error printing code gated by NDEBUG with a new flag: PYBIND11_DETAILED_ERROR_MESSAGES (#3913)
* Update cast.h * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Move definition to detail/common, change name, apply everywhere * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Rename debug_enabled in tests to detailed_error_messages_enabled
This commit is contained in:
committed by
GitHub
parent
75007dda72
commit
f0b9f755e4
@@ -361,10 +361,10 @@ TEST_SUBMODULE(methods_and_attributes, m) {
|
||||
|
||||
// test_bad_arg_default
|
||||
// Issue/PR #648: bad arg default debugging output
|
||||
#if !defined(NDEBUG)
|
||||
m.attr("debug_enabled") = true;
|
||||
#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)
|
||||
m.attr("detailed_error_messages_enabled") = true;
|
||||
#else
|
||||
m.attr("debug_enabled") = false;
|
||||
m.attr("detailed_error_messages_enabled") = false;
|
||||
#endif
|
||||
m.def("bad_arg_def_named", [] {
|
||||
auto m = py::module_::import("pybind11_tests");
|
||||
|
||||
Reference in New Issue
Block a user