LocateUri: new library to classify URIs in a standard way

This commit is contained in:
Max Kellermann
2015-10-22 09:29:02 +02:00
parent 1a5b66b78d
commit f072cbbba7
10 changed files with 477 additions and 189 deletions

View File

@@ -20,6 +20,7 @@
#include "config.h"
#include "CommandError.hxx"
#include "db/DatabaseError.hxx"
#include "LocateUri.hxx"
#include "client/Response.hxx"
#include "util/Error.hxx"
#include "Log.hxx"
@@ -114,6 +115,9 @@ print_error(Response &r, const Error &error)
return CommandResult::ERROR;
}
#endif
} else if (error.IsDomain(locate_uri_domain)) {
r.Error(ACK_ERROR_ARG, error.GetMessage());
return CommandResult::ERROR;
} else if (error.IsDomain(errno_domain)) {
r.Error(ACK_ERROR_SYSTEM, strerror(error.GetCode()));
return CommandResult::ERROR;