25 #ifndef INCLUDED_UseSendGuard_h_GUID_FEAB5647_E86B_4BA2_0A29_CB5665678CCB 26 #define INCLUDED_UseSendGuard_h_GUID_FEAB5647_E86B_4BA2_0A29_CB5665678CCB 29 #include <osvr/Util/Verbosity.h> 39 template <
typename InterfaceType,
typename F>
42 auto guard = iface->getSendGuard();
46 }
catch (std::exception
const &e) {
47 OSVR_DEV_VERBOSE(
"Caught exception: " << e.what());
50 OSVR_DEV_VERBOSE(
"Caught non-standard exception!");
58 template <
typename InterfaceType,
typename F>
65 #endif // INCLUDED_UseSendGuard_h_GUID_FEAB5647_E86B_4BA2_0A29_CB5665678CCB OSVR_ReturnCode useSendGuardVoid(InterfaceType &iface, F &&func)
Calls a void function using the send guard, returning success if it completes without exception...
Definition: UseSendGuard.h:59
#define OSVR_RETURN_FAILURE
The "failure" value for an OSVR_ReturnCode.
Definition: ReturnCodesC.h:47
#define OSVR_RETURN_SUCCESS
The "success" value for an OSVR_ReturnCode.
Definition: ReturnCodesC.h:45
Definition: benchGeometry.cpp:23
OSVR_ReturnCode useSendGuard(InterfaceType &iface, F &&func)
Calls a function using the send guard, returning the return value of the function if it completes wit...
Definition: UseSendGuard.h:40