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
ec10c20b
Commit
ec10c20b
authored
May 24, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #212 from abergmeier/master
Increase available information on invocation error.
parents
bd986fe5
2dd21571
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
5 deletions
+13
-5
example/example11.ref
+1
-1
example/example14.ref
+1
-1
example/example5.ref
+1
-1
example/issues.ref
+2
-2
include/pybind11/pybind11.h
+8
-0
No files found.
example/example11.ref
View file @
ec10c20b
...
@@ -29,7 +29,7 @@ kw_func(x=5, y=10)
...
@@ -29,7 +29,7 @@ kw_func(x=5, y=10)
kw_func(x=5, y=10)
kw_func(x=5, y=10)
Caught expected exception: Incompatible function arguments. The following argument types are supported:
Caught expected exception: Incompatible function arguments. The following argument types are supported:
1. (x : int = 100L, y : int = 200L) -> NoneType
1. (x : int = 100L, y : int = 200L) -> NoneType
Invoked with:
kw_func4: 13 17
kw_func4: 13 17
kw_func4: 1 2 3
kw_func4: 1 2 3
kw_func(x=1234, y=5678)
kw_func(x=1234, y=5678)
...
...
example/example14.ref
View file @
ec10c20b
...
@@ -11,7 +11,7 @@ Got void ptr : 0x7f9ba0f3c430
...
@@ -11,7 +11,7 @@ Got void ptr : 0x7f9ba0f3c430
Called Example1 destructor (0)
Called Example1 destructor (0)
Caught expected exception: Incompatible function arguments. The following argument types are supported:
Caught expected exception: Incompatible function arguments. The following argument types are supported:
1. (capsule) -> NoneType
1. (capsule) -> NoneType
Invoked with: [1, 2, 3]
None
None
Got null str : 0x0
Got null str : 0x0
<example.StringList object at 0x10d3277a0>
<example.StringList object at 0x10d3277a0>
...
...
example/example5.ref
View file @
ec10c20b
...
@@ -14,7 +14,7 @@ Polly is a parrot
...
@@ -14,7 +14,7 @@ Polly is a parrot
Molly is a dog
Molly is a dog
The following error is expected: Incompatible function arguments. The following argument types are supported:
The following error is expected: Incompatible function arguments. The following argument types are supported:
1. (example.Dog) -> NoneType
1. (example.Dog) -> NoneType
Invoked with: <Pet object at 0>
Callback function 1 called!
Callback function 1 called!
False
False
Callback function 2 called : Hello, x, True, 5
Callback function 2 called : Hello, x, True, 5
...
...
example/issues.ref
View file @
ec10c20b
...
@@ -7,8 +7,8 @@ Yay..
...
@@ -7,8 +7,8 @@ Yay..
0==0, 1==1, 2==2, 3==3, 4==4, 5==5, 6==6, 7==7, 8==8, 9==9,
0==0, 1==1, 2==2, 3==3, 4==4, 5==5, 6==6, 7==7, 8==8, 9==9,
Failed as expected: Incompatible function arguments. The following argument types are supported:
Failed as expected: Incompatible function arguments. The following argument types are supported:
1. (example.issues.ElementA) -> NoneType
1. (example.issues.ElementA) -> NoneType
Invoked with: None
Failed as expected: Incompatible function arguments. The following argument types are supported:
Failed as expected: Incompatible function arguments. The following argument types are supported:
1. (int) -> int
1. (int) -> int
Invoked with: 5.2
12.0
12.0
include/pybind11/pybind11.h
View file @
ec10c20b
...
@@ -422,6 +422,14 @@ protected:
...
@@ -422,6 +422,14 @@ protected:
msg
+=
it2
->
signature
;
msg
+=
it2
->
signature
;
msg
+=
"
\n
"
;
msg
+=
"
\n
"
;
}
}
msg
+=
" Invoked with: "
;
tuple
args_
(
args
,
true
);
for
(
std
::
size_t
ti
=
0
;
ti
!=
args_
.
size
();
++
ti
)
{
msg
+=
static_cast
<
std
::
string
>
(
static_cast
<
object
>
(
args_
[
ti
]).
str
());
if
((
ti
+
1
)
!=
args_
.
size
()
)
msg
+=
", "
;
}
PyErr_SetString
(
PyExc_TypeError
,
msg
.
c_str
());
PyErr_SetString
(
PyExc_TypeError
,
msg
.
c_str
());
return
nullptr
;
return
nullptr
;
}
else
if
(
!
result
)
{
}
else
if
(
!
result
)
{
...
...
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