lib/avahi/Publisher: move try/catch in GroupCallback() to the top level
This commit is contained in:
parent
d28cb93835
commit
09d1ab7abe
@ -60,7 +60,7 @@ Publisher::~Publisher() noexcept
|
|||||||
inline void
|
inline void
|
||||||
Publisher::GroupCallback(AvahiEntryGroup *g,
|
Publisher::GroupCallback(AvahiEntryGroup *g,
|
||||||
AvahiEntryGroupState state) noexcept
|
AvahiEntryGroupState state) noexcept
|
||||||
{
|
try {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case AVAHI_ENTRY_GROUP_ESTABLISHED:
|
case AVAHI_ENTRY_GROUP_ESTABLISHED:
|
||||||
break;
|
break;
|
||||||
@ -83,14 +83,14 @@ Publisher::GroupCallback(AvahiEntryGroup *g,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case AVAHI_ENTRY_GROUP_FAILURE:
|
case AVAHI_ENTRY_GROUP_FAILURE:
|
||||||
error_handler.OnAvahiError(std::make_exception_ptr(MakeError(*avahi_entry_group_get_client(g),
|
throw MakeError(*avahi_entry_group_get_client(g), "Avahi service group failure");
|
||||||
"Avahi service group failure")));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case AVAHI_ENTRY_GROUP_UNCOMMITED:
|
case AVAHI_ENTRY_GROUP_UNCOMMITED:
|
||||||
case AVAHI_ENTRY_GROUP_REGISTERING:
|
case AVAHI_ENTRY_GROUP_REGISTERING:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} catch (...) {
|
||||||
|
error_handler.OnAvahiError(std::current_exception());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user