Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
38ffb523
Commit
38ffb523
authored
Sep 11, 2015
by
Wenzel Jakob
Browse files
handle errors in callbacks
parent
5116b02e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
include/pybind/functional.h
include/pybind/functional.h
+2
-0
No files found.
include/pybind/functional.h
View file @
38ffb523
...
...
@@ -25,6 +25,8 @@ public:
object
src
(
src_
,
true
);
value
=
[
src
](
Args
...
args
)
->
Return
{
object
retval
(
pybind
::
handle
(
src
).
call
(
std
::
move
(
args
)...));
if
(
retval
.
ptr
()
==
nullptr
&&
PyErr_Occurred
())
throw
error_already_set
();
/* Visual studio 2015 parser issue: need parentheses around this expression */
return
(
retval
.
template
cast
<
Return
>());
};
...
...
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