diff options
author | Max Kellermann <max@musicpd.org> | 2016-10-27 21:59:17 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2016-10-27 22:04:41 +0200 |
commit | 6961bd61cac50117872f6cf43585ed594e45abb1 (patch) | |
tree | dee3ec435f875867ac5e7255cde862b07f469dbe /test/test_translate_song.cxx | |
parent | 726fc53e624a9b4005194cd57cba035e89b3331d (diff) |
LocateUri: migrate from class Error to C++ exceptions
Diffstat (limited to 'test/test_translate_song.cxx')
-rw-r--r-- | test/test_translate_song.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_translate_song.cxx b/test/test_translate_song.cxx index 4135cae2c..8b33a5c02 100644 --- a/test/test_translate_song.cxx +++ b/test/test_translate_song.cxx @@ -142,13 +142,13 @@ Client::GetStorage() const return ::storage; } -bool -Client::AllowFile(gcc_unused Path path_fs, gcc_unused Error &error) const +void +Client::AllowFile(gcc_unused Path path_fs) const { - /* always return false, so a SongLoader with a non-nullptr + /* always fail, so a SongLoader with a non-nullptr Client pointer will be regarded "insecure", while one with client==nullptr will allow all files */ - return false; + throw std::runtime_error("foo"); } static std::string |