mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 15:16:12 -04:00
Export more symbols, refactor how this is laid out for dll compliance
PiperOrigin-RevId: 402286243
This commit is contained in:
committed by
Copybara-Service
parent
51a19d24c1
commit
99b77bda8e
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "platform/impl/windows/bluetooth_classic_socket.h"
|
||||
|
||||
#include "platform/base/logging.h"
|
||||
#include "platform/impl/windows/generated/winrt/Windows.Networking.Sockets.h"
|
||||
|
||||
namespace location {
|
||||
@@ -123,8 +124,11 @@ Exception BluetoothSocket::BluetoothOutputStream::Write(const ByteArray& data) {
|
||||
buffer.Length(data.size());
|
||||
|
||||
try {
|
||||
winrt_stream_.WriteAsync(buffer).get();
|
||||
} catch (std::exception exception) {
|
||||
auto hresult = winrt_stream_.WriteAsync(buffer).get();
|
||||
} catch (winrt::hresult_error const& ex) {
|
||||
NEARBY_LOGS(ERROR) << __func__ << ": winrt exception: " << ex.code() << ": "
|
||||
<< winrt::to_string(ex.message());
|
||||
|
||||
return {Exception::kFailed};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user