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
1f66a584
Commit
1f66a584
authored
Jul 18, 2016
by
Wenzel Jakob
Browse files
pybind11.h: minor cleanups (no functionality change)
parent
6969e7c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
include/pybind11/pybind11.h
include/pybind11/pybind11.h
+4
-5
No files found.
include/pybind11/pybind11.h
View file @
1f66a584
...
...
@@ -421,15 +421,15 @@ protected:
/* When an exception is caught, give each registered exception
translator a chance to translate it to a Python exception
in reverse order of registration.
A translator may choose to do one of the following:
- catch the exception and call PyErr_SetString or PyErr_SetObject
to set a standard (or custom) Python exception, or
- do nothing and let the exception fall through to the next translator, or
- delegate translation to the next translator by throwing a new type of exception. */
auto
last_exception
=
std
::
current_exception
();
auto
last_exception
=
std
::
current_exception
();
auto
&
registered_exception_translators
=
pybind11
::
detail
::
get_internals
().
registered_exception_translators
;
for
(
auto
&
translator
:
registered_exception_translators
)
{
try
{
...
...
@@ -476,8 +476,7 @@ protected:
}
msg
+=
" Invoked with: "
;
tuple
args_
(
args
,
true
);
for
(
std
::
size_t
ti
=
overloads
->
is_constructor
?
1
:
0
;
ti
<
args_
.
size
();
++
ti
)
{
for
(
size_t
ti
=
overloads
->
is_constructor
?
1
:
0
;
ti
<
args_
.
size
();
++
ti
)
{
msg
+=
static_cast
<
std
::
string
>
(
static_cast
<
object
>
(
args_
[
ti
]).
str
());
if
((
ti
+
1
)
!=
args_
.
size
()
)
msg
+=
", "
;
...
...
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