Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e93cab16
Commit
e93cab16
authored
Feb 21, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide the exception code, handle lack of message.
parent
f9a4251a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
2 deletions
+38
-2
bindings/cil/src/exception.cs
bindings/cil/src/exception.cs
+38
-2
No files found.
bindings/cil/src/exception.cs
View file @
e93cab16
...
...
@@ -32,6 +32,18 @@ namespace VideoLAN.LibVLC
*/
public
class
VLCException
:
Exception
{
int
code
;
/**
* VLC exception code.
*/
public
int
Code
{
get
{
return
code
;
}
}
/**
* Creates a managed VLC exception.
*/
...
...
@@ -57,6 +69,25 @@ namespace VideoLAN.LibVLC
:
base
(
message
,
inner
)
{
}
/**
* Creates a VLC exception
* @param code VLC exception code
* @param message VLC exception message
*/
public
VLCException
(
int
code
,
string
message
)
:
base
(
message
)
{
this
.
code
=
code
;
}
/**
* Creates a VLC exception
* @param code VLC exception code
*/
public
VLCException
(
int
code
)
:
base
()
{
this
.
code
=
code
;
}
};
/**
...
...
@@ -92,11 +123,16 @@ namespace VideoLAN.LibVLC
*/
public
void
Raise
()
{
if
(
raised
==
0
)
return
;
string
msg
=
U8String
.
FromNative
(
message
);
try
{
string
msg
=
U8String
.
FromNative
(
GetMessage
(
this
));
if
(
msg
!=
null
)
throw
new
VLCException
(
msg
);
throw
new
VLCException
(
code
,
msg
);
else
throw
new
VLCException
(
code
);
}
finally
{
...
...
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