diff options
author | Max Kellermann <max@duempel.org> | 2013-08-10 18:02:44 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-04 18:14:22 +0200 |
commit | 29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch) | |
tree | 79766830b55ebca38ddbce84d8d548227eedb69e /src/event/FullyBufferedSocket.cxx | |
parent | c9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff) | |
download | mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.gz mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.xz mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.zip |
util/Error: new error passing library
Replaces GLib's GError.
Diffstat (limited to 'src/event/FullyBufferedSocket.cxx')
-rw-r--r-- | src/event/FullyBufferedSocket.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
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 <assert.h> #include <stdint.h> @@ -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; } |