lib/sqlite, sticker: migrate from class Error to C++ exceptions
This commit is contained in:
		@@ -22,7 +22,6 @@
 | 
			
		||||
#include "Partition.hxx"
 | 
			
		||||
#include "Idle.hxx"
 | 
			
		||||
#include "Stats.hxx"
 | 
			
		||||
#include "util/Error.hxx"
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_DATABASE
 | 
			
		||||
#include "db/DatabaseError.hxx"
 | 
			
		||||
@@ -33,6 +32,8 @@
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <stdexcept>
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_DATABASE
 | 
			
		||||
 | 
			
		||||
const Database &
 | 
			
		||||
@@ -63,8 +64,12 @@ Instance::OnDatabaseSongRemoved(const char *uri)
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_SQLITE
 | 
			
		||||
	/* if the song has a sticker, remove it */
 | 
			
		||||
	if (sticker_enabled())
 | 
			
		||||
		sticker_song_delete(uri, IgnoreError());
 | 
			
		||||
	if (sticker_enabled()) {
 | 
			
		||||
		try {
 | 
			
		||||
			sticker_song_delete(uri);
 | 
			
		||||
		} catch (const std::runtime_error &) {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	partition->StaleSong(uri);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user