util/Error: new error passing library

Replaces GLib's GError.
This commit is contained in:
Max Kellermann
2013-08-10 18:02:44 +02:00
parent c9fcc7f148
commit 29030b54c9
256 changed files with 3269 additions and 3371 deletions

View File

@@ -21,6 +21,8 @@
#include "BufferedSocket.hxx"
#include "system/SocketError.hxx"
#include "util/fifo_buffer.h"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include <assert.h>
#include <stdint.h>
@@ -97,8 +99,11 @@ BufferedSocket::ResumeInput()
case InputResult::MORE:
if (fifo_buffer_is_full(input)) {
// TODO
OnSocketError(g_error_new_literal(g_quark_from_static_string("buffered_socket"),
0, "Input buffer is full"));
static constexpr Domain buffered_socket_domain("buffered_socket");
Error error;
error.Set(buffered_socket_domain,
"Input buffer is full");
OnSocketError(std::move(error));
return false;
}