summaryrefslogtreecommitdiff
path: root/src/PlaylistFile.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-12-15 22:26:26 +0100
committerMax Kellermann <max@duempel.org>2015-12-16 00:33:30 +0100
commit24b2198668ad5d0b3f965bc34762bfac4004bcf2 (patch)
treee1879d21e84d9f59cb0fc0eeda29bdfeb3105ce4 /src/PlaylistFile.cxx
parentd29be0f46099417f9148189ce33b3772b7849c9c (diff)
fs/io/FileOutputStream: use C++ exceptions in constructor
Diffstat (limited to 'src/PlaylistFile.cxx')
-rw-r--r--src/PlaylistFile.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx
index d8c15841b..259c26974 100644
--- a/src/PlaylistFile.cxx
+++ b/src/PlaylistFile.cxx
@@ -232,11 +232,7 @@ SavePlaylistFile(const PlaylistFileContents &contents, const char *utf8path,
if (path_fs.IsNull())
return false;
- FileOutputStream fos(path_fs, error);
- if (!fos.IsDefined()) {
- TranslatePlaylistError(error);
- return false;
- }
+ FileOutputStream fos(path_fs);
BufferedOutputStream bos(fos);
@@ -403,11 +399,7 @@ spl_append_song(const char *utf8path, const DetachedSong &song, Error &error)
if (path_fs.IsNull())
return false;
- AppendFileOutputStream fos(path_fs, error);
- if (!fos.IsDefined()) {
- TranslatePlaylistError(error);
- return false;
- }
+ AppendFileOutputStream fos(path_fs);
if (fos.Tell() / (MPD_PATH_MAX + 1) >= playlist_max_length) {
error.Set(playlist_domain, int(PlaylistResult::TOO_LARGE),