+static xbt_socket_t try_gras_socket_client_from_string(const char *host)
+{
+ volatile xbt_socket_t sock = NULL;
+ xbt_ex_t e;
+ TRY {
+ sock = gras_socket_client_from_string(host);
+ }
+ CATCH(e) {
+ if (e.category != system_error)
+ /* dunno what happened, let the exception go through */
+ RETHROWF("Unable to connect to the server: %s");
+ xbt_ex_free(e);
+ }
+ return sock;
+}
+
+static void my_gras_msg_wait(double timeout, const char* msgt_want,
+ xbt_socket_t* expeditor, void *payload,
+ const char *error_msg)
+{
+ TRY {
+ gras_msg_wait(timeout, msgt_want, expeditor, payload);
+ }
+ CATCH_ANONYMOUS {
+ RETHROWF("%s: %s", error_msg);
+ }
+}
+