From 29030b54c98b0aee65fbc10ebf7ba36bed98c02c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 10 Aug 2013 18:02:44 +0200 Subject: util/Error: new error passing library Replaces GLib's GError. --- src/event/FullyBufferedSocket.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/event/FullyBufferedSocket.cxx') diff --git a/src/event/FullyBufferedSocket.cxx b/src/event/FullyBufferedSocket.cxx index f8b149500..3ffd9f416 100644 --- a/src/event/FullyBufferedSocket.cxx +++ b/src/event/FullyBufferedSocket.cxx @@ -21,6 +21,8 @@ #include "FullyBufferedSocket.hxx" #include "system/SocketError.hxx" #include "util/fifo_buffer.h" +#include "util/Error.hxx" +#include "util/Domain.hxx" #include #include @@ -98,8 +100,10 @@ FullyBufferedSocket::Write(const void *data, size_t length) if (!output.Append(data, length)) { // TODO - OnSocketError(g_error_new_literal(g_quark_from_static_string("buffered_socket"), - 0, "Output buffer is full")); + static constexpr Domain buffered_socket_domain("buffered_socket"); + Error error; + error.Set(buffered_socket_domain, "Output buffer is full"); + OnSocketError(std::move(error)); return false; } -- cgit v1.2.3