mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-30 22:59:51 +02:00
Switch to exception_ptr for async exceptions
This commit is contained in:
parent
5e508cae2e
commit
d49b5c251c
5 changed files with 24 additions and 36 deletions
|
@ -78,17 +78,13 @@ private:
|
|||
};
|
||||
|
||||
|
||||
/// would be nicer to use std::exception_ptr
|
||||
/// but not supported on all plattforms
|
||||
typedef std::shared_ptr<std::exception> shared_exception_ptr;
|
||||
|
||||
/// Interface: callback for a received message and error reporting
|
||||
class MessageReceiver
|
||||
{
|
||||
public:
|
||||
virtual ~MessageReceiver() = default;
|
||||
virtual void onMessageReceived(ClientConnection* connection, const msg::BaseMessage& baseMessage, char* buffer) = 0;
|
||||
virtual void onException(ClientConnection* connection, shared_exception_ptr exception) = 0;
|
||||
virtual void onException(ClientConnection* connection, std::exception_ptr exception) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue