mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-24 20:07:40 +02:00
Add error message
This commit is contained in:
parent
121a0beca7
commit
30ab9773cb
5 changed files with 92 additions and 1 deletions
|
@ -59,6 +59,7 @@
|
|||
#include "browseZeroConf/browse_mdns.hpp"
|
||||
#include "common/aixlog.hpp"
|
||||
#include "common/message/client_info.hpp"
|
||||
#include "common/message/error.hpp"
|
||||
#include "common/message/hello.hpp"
|
||||
#include "common/message/time.hpp"
|
||||
#include "common/snap_exception.hpp"
|
||||
|
@ -299,6 +300,11 @@ void Controller::getNextMessage()
|
|||
player_->setVolume({serverSettings_->getVolume() / 100., serverSettings_->isMuted()});
|
||||
// }
|
||||
}
|
||||
else if (response->type == message_type::kError)
|
||||
{
|
||||
auto error = msg::message_cast<msg::Error>(std::move(response));
|
||||
LOG(ERROR, LOG_TAG) << "Received error: " << error->message << ", code: " << error->code << "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING, LOG_TAG) << "Unexpected message received, type: " << response->type << "\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue