db/Interface: migrate Update() from class Error to C++ exceptions

This commit is contained in:
Max Kellermann
2016-10-29 10:59:18 +02:00
parent df142d4f61
commit a2e3dc0592
3 changed files with 10 additions and 16 deletions

View File

@@ -36,7 +36,6 @@
#include "ls.hxx"
#include "mixer/Volume.hxx"
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include "util/StringAPI.hxx"
#include "fs/AllocatedPath.hxx"
#include "Stats.hxx"
@@ -277,13 +276,10 @@ static CommandResult
handle_update(Response &r, Database &db,
const char *uri_utf8, bool discard)
{
Error error;
unsigned id = db.Update(uri_utf8, discard, error);
unsigned id = db.Update(uri_utf8, discard);
if (id > 0) {
r.Format("updating_db: %i\n", id);
return CommandResult::OK;
} else if (error.IsDefined()) {
return print_error(r, error);
} else {
/* Database::Update() has returned 0 without setting
the Error: the method is not implemented */