@@ -1017,9 +1017,10 @@ type_caster<T, SFINAE> &load_type(type_caster<T, SFINAE> &conv, const handle &ha
1017
1017
" Internal error: type_caster should only be used for C++ types" );
1018
1018
if (!conv.load (handle, true )) {
1019
1019
#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)
1020
- throw cast_error (" Unable to cast Python instance of type "
1021
- + (std::string) str (type::handle_of (handle)) + " to C++ type '?' (#define "
1022
- " PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)" );
1020
+ throw cast_error (
1021
+ " Unable to cast Python instance of type " + (std::string) str (type::handle_of (handle))
1022
+ + " to C++ type '?' (#define "
1023
+ " PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)" );
1023
1024
#else
1024
1025
throw cast_error (" Unable to cast Python instance of type "
1025
1026
+ (std::string) str (type::handle_of (handle)) + " to C++ type '"
@@ -1088,7 +1089,7 @@ detail::enable_if_t<!detail::move_never<T>::value, T> move(object &&obj) {
1088
1089
throw cast_error (
1089
1090
" Unable to cast Python " + (std::string) str (type::handle_of (obj))
1090
1091
+ " instance to C++ rvalue: instance has multiple references"
1091
- " (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)" );
1092
+ " (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)" );
1092
1093
#else
1093
1094
throw cast_error (" Unable to move from Python " + (std::string) str (type::handle_of (obj))
1094
1095
+ " instance to C++ " + type_id<T>()
@@ -1198,8 +1199,9 @@ PYBIND11_NAMESPACE_END(detail)
1198
1199
// but it is an easy minor optimization.
1199
1200
#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)
1200
1201
inline cast_error cast_error_unable_to_convert_call_arg (const std::string &name) {
1201
- return cast_error (" Unable to convert call argument '" + name + " ' to Python object (#define "
1202
- " PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)" );
1202
+ return cast_error (" Unable to convert call argument '" + name
1203
+ + " ' to Python object (#define "
1204
+ " PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)" );
1203
1205
}
1204
1206
#else
1205
1207
inline cast_error cast_error_unable_to_convert_call_arg (const std::string &name,
0 commit comments