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
4f393553
Commit
4f393553
authored
Apr 12, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist/Song: catch SongLoader exceptions
Fixes aborted "load" commands due to SongLoader failure.
parent
91afc7b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
PlaylistSong.cxx
src/playlist/PlaylistSong.cxx
+10
-1
No files found.
src/playlist/PlaylistSong.cxx
View file @
4f393553
...
...
@@ -27,6 +27,8 @@
#include "util/Error.hxx"
#include "DetachedSong.hxx"
#include <stdexcept>
#include <string.h>
static
void
...
...
@@ -44,7 +46,14 @@ merge_song_metadata(DetachedSong &add, const DetachedSong &base)
static
bool
playlist_check_load_song
(
DetachedSong
&
song
,
const
SongLoader
&
loader
)
{
DetachedSong
*
tmp
=
loader
.
LoadSong
(
song
.
GetURI
(),
IgnoreError
());
DetachedSong
*
tmp
;
try
{
tmp
=
loader
.
LoadSong
(
song
.
GetURI
(),
IgnoreError
());
}
catch
(
const
std
::
runtime_error
&
)
{
return
false
;
}
if
(
tmp
==
nullptr
)
return
false
;
...
...
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