Commit Graph

521 Commits

Author SHA1 Message Date
Steven OBrien 541da2740d db/simple: add missing "return"
SimpleDatabase::Visit() always throws exception when visiting a song.
Adding a song to the queue always results in a "No such directory"
error response, although the song is successfully added.  This
behaviour was introduced by commit
3ff728ab02.  This patch fixes this.

https://bugs.musicpd.org/view.php?id=4601
2016-11-23 17:30:30 +01:00
Max Kellermann 95e2bec215 decoder/DecoderPlugin: container_scan() returns forward_list<DetachedSong>
Speed up container_scan() again, by eliminating the need to call
scan_file() for each item.
2016-11-22 16:49:31 +01:00
Max Kellermann c5133f6088 db/update/Container: catch C++ exceptions 2016-11-22 12:16:14 +01:00
Max Kellermann 0abee77e62 decoder/DecoderPlugin: container_scan() returns forward_list<string> 2016-11-22 09:33:52 +01:00
Max Kellermann 22dcca9832 util/Error: remove obsolete class 2016-11-10 12:58:26 +01:00
Max Kellermann a2e3dc0592 db/Interface: migrate Update() from class Error to C++ exceptions 2016-10-29 10:59:18 +02:00
Max Kellermann df142d4f61 db/simple: migrate Mount() from class Error to C++ exceptions 2016-10-29 10:56:31 +02:00
Max Kellermann fac8edd47a db/Interface: migrate visitor methods from class Error to C++ exceptions 2016-10-29 10:42:56 +02:00
Max Kellermann 131441846b db/Error: remove unused variable db_domain 2016-10-29 10:42:56 +02:00
Max Kellermann 3ff728ab02 db/Visitor: remove the Error parameter
Implementations shall use exceptions instead.
2016-10-29 10:04:43 +02:00
Max Kellermann 78bf4ef5fa db/Configured: migrate from class Error to C++ exceptions 2016-10-29 10:01:50 +02:00
Max Kellermann 318d0b3976 db/simple/Save: move log call to SimpleDatabase::Load() 2016-10-29 10:00:35 +02:00
Max Kellermann 90a14e14f4 db/simple/Save: migrate from class Error to C++ exceptions 2016-10-29 09:45:34 +02:00
Max Kellermann dea46e8d5a db/Plugin: migrate from class Error to C++ exceptions 2016-10-28 23:15:22 +02:00
Max Kellermann 7e5ce623fe db/simple: throw C++ exception on init error 2016-10-28 23:13:18 +02:00
Max Kellermann e17805f208 config/Block: GetPath() throws exception on error 2016-10-28 23:08:42 +02:00
Max Kellermann d8bcdca55a config/Block: rename GetBlockPath() to GetPath() 2016-10-28 23:07:26 +02:00
Max Kellermann 4bd67bc298 db/update/InotifySource: migrate from class Error to C++ exceptions 2016-10-28 10:35:31 +02:00
Max Kellermann 1560749579 db/update/UpdateIO: include cleanup 2016-10-28 10:22:44 +02:00
Max Kellermann c598686bd9 storage: migrate from class Error to C++ exceptions 2016-10-27 21:35:19 +02:00
Max Kellermann 086652dd50 Instance: add GetDatabaseOrThrow() 2016-10-26 18:47:19 +02:00
Max Kellermann 100308db02 db/update: catch exceptions from Storage plugins 2016-09-16 17:43:32 +02:00
Max Kellermann 220d9528a3 archive/Plugin: migrate open() from class Error to C++ exceptions 2016-09-09 18:36:36 +02:00
Max Kellermann d3c7fac606 thread/Thread: throw std::system_error on error 2016-06-17 19:11:20 +02:00
Max Kellermann c98330909a db/update/Walk: use AllocatedPath methods instead of PathTraitsFS 2016-04-21 14:15:01 +02:00
Max Kellermann b9f535cd49 lib/icu/Win32: throw exception on error 2016-04-21 10:15:40 +02:00
Max Kellermann cd041f8574 decoder/Plugin: container_scan() returns AllocatedString 2016-04-13 12:23:10 +02:00
Max Kellermann 2fd5182608 db/Interface: GetSong() throws exception on error 2016-03-19 00:19:50 +01:00
Max Kellermann f55bdf07d3 db/Interface: Open() throws exception on error 2016-03-19 00:05:11 +01:00
Max Kellermann 6c2b532ae3 db/proxy: throw exception on error 2016-03-19 00:02:50 +01:00
Max Kellermann 2539f294e4 db/proxy: move code to MakeError()
Use this function instead of CheckError() when we already know an
error has occurred.
2016-03-18 23:43:28 +01:00
Max Kellermann b6a3ce9305 db/proxy: fix inconsistent error handling in VisitUniqueTags() 2016-03-18 23:42:04 +01:00
Max Kellermann b07495aae9 db/proxy: remove superfluous CheckError() call 2016-03-18 23:41:24 +01:00
Max Kellermann 686a53215d db/proxy: use AtScopeExit() 2016-03-18 23:10:42 +01:00
Max Kellermann 6fd7d8191e db/simple: refactor Check() to throw exception 2016-03-18 22:21:09 +01:00
Max Kellermann 2ccd1cc9f0 db/simple: remove misplaced "pure" attribute 2016-03-18 22:18:09 +01:00
Max Kellermann 8167bdd978 db/simple: handle Database::Open() exceptions in Mount() 2016-03-18 18:55:54 +01:00
Max Kellermann dfb3e34f7b db/lazy: remove obsolete class
Obsoleted by commit d4d4d621
2016-03-18 18:48:27 +01:00
Max Kellermann 45ee75055e db/upnp: remove obsolete code comment 2016-03-18 18:48:00 +01:00
Max Kellermann 7e096ee2c5 db/update/Remove: update code comment 2016-03-18 16:58:06 +01:00
Max Kellermann 86a90daf1b db/update/Remove: pass URI to Remove() 2016-03-18 16:57:43 +01:00
Max Kellermann 42f7df9681 db/update/Remove: reimplement as a non-blocking queue
This reduces overhead for two reasons:

1. calls to Remove() are non-blocking

2. RunDeferred() may work on large chunks at a time, reducing the
   number of RunDeferred() calls
2016-03-18 16:43:02 +01:00
Max Kellermann 2edad38c7c db/DatabaseListener: pass URI to OnDatabaseSongRemoved()
There's no point in passing a LightSong reference here; the callee is
interested only in the URI.
2016-03-18 16:22:33 +01:00
Max Kellermann 099455db25 db/update/Service: convert const to constexpr 2016-03-05 20:08:01 +01:00
Max Kellermann 3146bf51e6 db/update/Service: eliminate attribute "progress"
Use walk!=nullptr instead.
2016-03-05 19:40:11 +01:00
Max Kellermann 1aee89f5ea *: include cleanup (using iwyu) 2016-03-01 22:08:13 +01:00
Max Kellermann 65386f52f0 db/proxy: throw DatabaseError on error 2016-02-28 11:47:03 +01:00
Max Kellermann 5b8dce7456 db/simple: throw DatabaseError on error 2016-02-28 11:40:59 +01:00
Max Kellermann de938eb621 db/simple: handle exception in Open() properly, fix memory leak 2016-02-28 11:40:39 +01:00
Max Kellermann 83cc6c0835 db/simple: use second Error instance in Open()
Don't need to clear the caller-specified one.
2016-02-28 11:38:22 +01:00