Commit Graph

10429 Commits

Author SHA1 Message Date
Max Kellermann
224d511616 upnp/Discovery: use std::unique_ptr in WorkQueue 2016-02-06 22:26:14 +01:00
Max Kellermann
050c6cc4b0 upnp/Discovery: use AtScopeExit() for exception-safety 2016-02-06 22:06:43 +01:00
Max Kellermann
bc2d23ff0d util/ScopeExit: new utility library
Similar to boost::scope_exit, but fewer include dependencies.
2016-02-06 22:03:37 +01:00
Max Kellermann
2939fadd6a decoder/Control: use ScopeLock 2015-12-31 13:45:10 +01:00
Max Kellermann
ef260377c3 decoder/Internal: use ScopeLock 2015-12-31 13:44:19 +01:00
Max Kellermann
b9213df64b decoder/API: use ScopeLock 2015-12-31 13:43:35 +01:00
Max Kellermann
aa7694047b decoder/Thread: pass InputStream errors to DecoderControl::error
Give MPD clients access to the error condition.
2015-12-31 13:39:13 +01:00
Max Kellermann
e2bc63217a decoder/Thread: decoder_input_stream_open() returns std::unique_ptr<InputStream>
Fixes memory leak after InputStream::Check() failure.
2015-12-31 13:39:13 +01:00
Max Kellermann
6c5b8bcf9d decoder/Thread: log all errors 2015-12-31 13:38:35 +01:00
Max Kellermann
e425fe3f97 decoder/Thread: use std::unique_ptr<InputStream> 2015-12-31 13:12:28 +01:00
Max Kellermann
6507993972 decoder/Thread: move decoder_command_finished_locked() to DecoderControl 2015-12-31 13:06:31 +01:00
Max Kellermann
f081696f62 decoder/Thread: convert "int ret" to "bool success" 2015-12-31 13:02:55 +01:00
Max Kellermann
09157c3130 decoder/Thread: use ScopeLock in decoder_run_stream() 2015-12-31 13:01:49 +01:00
Max Kellermann
00626b1633 decoder/Thread: use std::unique_ptr<InputStream> 2015-12-31 13:01:03 +01:00
Max Kellermann
7e0cdbe502 decoder/Thread: use ScopeUnlock for exception-safety 2015-12-31 12:59:06 +01:00
Max Kellermann
ca08902d71 decoder/Thread: use ScopeLock in TryDecoderFile() 2015-12-31 12:58:58 +01:00
Max Kellermann
fad0e834d5 decoder/Thread: always unlock mutex before returning from TryDecoderFile()
Remove that surprising rule.
2015-12-31 12:57:35 +01:00
Max Kellermann
dc76eb6139 decoder/Thread: mutex not locked for decoder_run_{file,stream}() 2015-12-31 12:42:02 +01:00
Max Kellermann
55e113c7a7 decoder/Thread: document locking rules 2015-12-31 12:36:32 +01:00
Max Kellermann
b62f5e079e decoder/Thread: use ScopeLock for exception-safety 2015-12-31 12:36:00 +01:00
Max Kellermann
ac1eaff6ec thread/Mutex: add class ScopeUnlock() 2015-12-31 12:30:53 +01:00
Max Kellermann
45f6129ae7 player/Control: don't stop playback in Play()
Instead of stopping playback completely, only CANCEL the queued song
if necessary, and use the SEEK command to play the selected song.
SEEK will take care for current playback state.
2015-12-29 13:49:15 +01:00
Max Kellermann
f3503e0026 fs/DirectoryReader: use C++ exceptions instead of class Error 2015-12-29 12:56:26 +01:00
Max Kellermann
826a654c95 fs/DirectoryReader: use C++11 initializer 2015-12-29 12:56:26 +01:00
Max Kellermann
08754e6ce7 system/Error: add IsAccessDenied() 2015-12-29 12:56:26 +01:00
Max Kellermann
3843972b05 command/Error: workaround for gcc 4.x rethrow_exception(exception_ptr) 2015-12-29 12:39:28 +01:00
Max Kellermann
37862f0f20 PlaylistFile: convert more APIs from Error to std::exception 2015-12-28 14:20:37 +01:00
Max Kellermann
1f184f4aec PlaylistFile: throw exception on spl_map_to_fs() failure 2015-12-28 14:20:37 +01:00
Max Kellermann
db5a691693 PlaylistFile: remove obsolete function TranslatePlaylistError() 2015-12-28 14:20:37 +01:00
Max Kellermann
48693250a4 command/Error: no std::exception_ptr forward declaration
This breaks on some standard library implementations.
2015-12-28 14:20:37 +01:00
Max Kellermann
570dcb6309 command/Error: support nested exceptions 2015-12-28 07:00:01 +01:00
Max Kellermann
19e43087a8 command/Error: move code to ToAck(std::exception_ptr) 2015-12-28 06:53:52 +01:00
Max Kellermann
fe0b6a1117 PlaylistFile: convert system_error::ENOENT to PlaylistResult::NO_SUCH_LIST 2015-12-28 06:44:01 +01:00
Max Kellermann
72851647ca PlaylistError: fix NoSuchSong() code 2015-12-28 06:44:01 +01:00
Max Kellermann
1c90400081 command/Error: pass std::exception_ptr to PrintError()
Necessary to preserve type information.  The try/catch sequence didn't
work previously.
2015-12-27 06:43:55 +01:00
Max Kellermann
672e18cac9 system/Error: fix duplicate strerror() call
Apparently, the std::system_error constructor appends strerror()
already.
2015-12-27 06:05:53 +01:00
Max Kellermann
e939d667d9 protocol/Ack: add exception class wrapping enum ack 2015-12-18 09:53:02 +01:00
Max Kellermann
8bb5a565cd PlaylistError: add exception class wrapping enum PlaylistResult 2015-12-18 09:21:11 +01:00
Max Kellermann
7562c5751c db/Configured: allocate ConfigBlock on the stack 2015-12-18 09:17:12 +01:00
Max Kellermann
e6e7d6dbd6 fs/io/Reader: use C++ exceptions instead of class Error 2015-12-18 01:08:16 +01:00
Max Kellermann
fe60c52c70 system/Error: add MakeErrno(), MakeLastError() 2015-12-18 01:08:16 +01:00
Max Kellermann
93f4590453 system/Error: add IsFileNotFound() 2015-12-18 00:54:23 +01:00
Max Kellermann
1098d271b8 util/Error: add bridge to std::exception 2015-12-18 00:24:43 +01:00
Max Kellermann
51168169e7 util/Tokenizer: use std::runtime_error on syntax error 2015-12-16 11:34:26 +01:00
Max Kellermann
d256a0e98f config/ConfigFile: use std::exception on syntax error 2015-12-16 11:13:16 +01:00
Max Kellermann
6717325c3f config/ConfigFile: use std::unique_ptr 2015-12-16 11:13:16 +01:00
Max Kellermann
c4a0571e7a config/ConfigFile: fix typo in format string 2015-12-16 11:13:16 +01:00
Max Kellermann
e4a06da14e fs/io/OutputStream: use C++ exceptions in Write() 2015-12-16 10:24:43 +01:00
Max Kellermann
36d6ead65c fs/io/GzipOutputStream: use C++ exceptions in constructor 2015-12-16 10:14:56 +01:00
Max Kellermann
7eae3bc8c5 fs/io/FileOutputStream: use C++ exceptions in Commit() 2015-12-16 00:33:33 +01:00