Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
68ca3b63
Commit
68ca3b63
authored
Jul 01, 2016
by
Merlin Nimier-David
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more informative error message when py::make_tuple fails
parent
00062595
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
include/pybind11/cast.h
+10
-3
No files found.
include/pybind11/cast.h
View file @
68ca3b63
...
...
@@ -838,9 +838,16 @@ template <return_value_policy policy = return_value_policy::automatic_reference,
{
object
(
detail
::
type_caster
<
typename
detail
::
intrinsic_type
<
Args
>::
type
>::
cast
(
std
::
forward
<
Args
>
(
args_
),
policy
,
nullptr
),
false
)...
}
};
for
(
auto
&
arg_value
:
args
)
if
(
!
arg_value
)
throw
cast_error
(
"make_tuple(): unable to convert arguments to Python objects"
);
for
(
auto
&
arg_value
:
args
)
{
if
(
!
arg_value
)
{
#if defined(NDEBUG)
throw
cast_error
(
"make_tuple(): unable to convert arguments to Python object (compile in debug mode for details)"
);
#else
throw
cast_error
(
"make_tuple(): unable to convert arguments of types '"
+
(
std
::
string
)
type_id
<
std
::
tuple
<
Args
...
>>
()
+
"' to Python object"
);
#endif
}
}
tuple
result
(
size
);
int
counter
=
0
;
for
(
auto
&
arg_value
:
args
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment