Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a1e9678b
Commit
a1e9678b
authored
8 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/Thread: std::throw_with_nested() to wrap caught exception
parent
be5d629c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
DecoderThread.cxx
src/decoder/DecoderThread.cxx
+3
-14
No files found.
src/decoder/DecoderThread.cxx
View file @
a1e9678b
...
...
@@ -361,25 +361,14 @@ try {
:
decoder_run_stream
(
decoder
,
real_uri
);
}
catch
(
StopDecoder
)
{
return
true
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
/* copy the exception to decoder.error */
if
(
decoder
.
error
.
IsDefined
())
{
/* decoder.error already set, now we have a second
one; only log the second one */
LogError
(
e
);
return
false
;
}
}
catch
(...)
{
const
char
*
error_uri
=
real_uri
;
const
std
::
string
allocated
=
uri_remove_auth
(
error_uri
);
if
(
!
allocated
.
empty
())
error_uri
=
allocated
.
c_str
();
decoder
.
error
.
Format
(
decoder_domain
,
"Failed to decode %s: %s"
,
error_uri
,
e
.
what
());
return
false
;
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to decode %s"
,
error_uri
));
}
/**
...
...
This diff is collapsed.
Click to expand it.
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