Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
3a38a0e0
Commit
3a38a0e0
authored
Sep 03, 2009
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python-ctypes: tweak exception handling
parent
c141073f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
bindings/python-ctypes/header.py
bindings/python-ctypes/header.py
+5
-1
No files found.
bindings/python-ctypes/header.py
View file @
3a38a0e0
...
@@ -33,6 +33,7 @@ create a libvlc Instance. From this instance, you can then create
...
@@ -33,6 +33,7 @@ create a libvlc Instance. From this instance, you can then create
L{MediaPlayer} and L{MediaListPlayer} instances.
L{MediaPlayer} and L{MediaListPlayer} instances.
"""
"""
import
logging
import
ctypes
import
ctypes
import
sys
import
sys
...
@@ -224,10 +225,13 @@ def check_vlc_exception(result, func, args):
...
@@ -224,10 +225,13 @@ def check_vlc_exception(result, func, args):
"""Error checking method for functions using an exception in/out parameter.
"""Error checking method for functions using an exception in/out parameter.
"""
"""
ex
=
args
[
-
1
]
ex
=
args
[
-
1
]
if
not
isinstance
(
ex
,
(
VLCException
,
MediaControlException
)):
logging
.
warn
(
"python-vlc: error when processing function %s. Please report this as a bug to vlc-devel@videolan.org"
%
str
(
func
))
return
result
# Take into account both VLCException and MediacontrolException:
# Take into account both VLCException and MediacontrolException:
c
=
getattr
(
ex
,
'raised'
,
getattr
(
ex
,
'code'
,
0
))
c
=
getattr
(
ex
,
'raised'
,
getattr
(
ex
,
'code'
,
0
))
if
c
:
if
c
:
raise
LibVLCException
(
args
[
-
1
]
.
message
)
raise
LibVLCException
(
ex
.
message
)
return
result
return
result
### End of header.py ###
### End of header.py ###
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