diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-23 13:02:04 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-23 13:03:50 +0200 |
commit | 4141b5e8e6296ca8ab94553e27257f8c2b107461 (patch) | |
tree | 02c5a45a7e6736c24d76dbb24eeb468f1ced11d9 /common/genericresource.cpp | |
parent | 6746247a49f09287ae4924c5c3df791f9bf61cbc (diff) | |
download | sink-4141b5e8e6296ca8ab94553e27257f8c2b107461.tar.gz sink-4141b5e8e6296ca8ab94553e27257f8c2b107461.zip |
Less noise and better error handling.
Trying to read from non-existant databases no longer prints error
messages.
Diffstat (limited to 'common/genericresource.cpp')
-rw-r--r-- | common/genericresource.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/genericresource.cpp b/common/genericresource.cpp index 112ce64..3ffc56b 100644 --- a/common/genericresource.cpp +++ b/common/genericresource.cpp | |||
@@ -107,14 +107,15 @@ private slots: | |||
107 | [queue]() { return !queue->isEmpty(); }, | 107 | [queue]() { return !queue->isEmpty(); }, |
108 | [this, queue](KAsync::Future<void> &future) { | 108 | [this, queue](KAsync::Future<void> &future) { |
109 | queue->dequeueBatch(100, [this](const QByteArray &data) { | 109 | queue->dequeueBatch(100, [this](const QByteArray &data) { |
110 | Trace() << "Got value"; | ||
111 | return processQueuedCommand(data); | 110 | return processQueuedCommand(data); |
112 | } | 111 | } |
113 | ).then<void>([&future, queue](){ | 112 | ).then<void>([&future, queue](){ |
114 | future.setFinished(); | 113 | future.setFinished(); |
115 | }, | 114 | }, |
116 | [&future](int i, QString error) { | 115 | [&future](int i, QString error) { |
117 | Warning() << "Error while getting message from messagequeue: " << error; | 116 | if (i != MessageQueue::ErrorCodes::NoMessageFound) { |
117 | Warning() << "Error while getting message from messagequeue: " << error; | ||
118 | } | ||
118 | future.setFinished(); | 119 | future.setFinished(); |
119 | }).exec(); | 120 | }).exec(); |
120 | } | 121 | } |