}
CATCH(e) {
gotit = 1;
+ xbt_assert(e.category == unknown_error,
+ "Got wrong category: %d (instead of %d)", e.category,
+ unknown_error);
+ xbt_assert(e.value == 42, "Got wrong value: %d (!=42)", e.value);
+ xbt_assert(!strncmp(e.msg, exception_msg, strlen(exception_msg)),
+ "Got wrong message: %s", e.msg);
+ xbt_ex_free(e);
}
if (!gotit) {
THROWF(unknown_error, 0, "Didn't got the remote exception!");
}
- xbt_assert(e.category == unknown_error,
- "Got wrong category: %d (instead of %d)", e.category,
- unknown_error);
- xbt_assert(e.value == 42, "Got wrong value: %d (!=42)", e.value);
- xbt_assert(!strncmp(e.msg, exception_msg, strlen(exception_msg)),
- "Got wrong message: %s", e.msg);
- xbt_ex_free(e);
}
}
}
CATCH(e) {
gotit = 1;
+ xbt_assert(e.value == 42, "Got wrong value: %d (!=42)", e.value);
+ xbt_assert(!strncmp(e.msg, exception_msg, strlen(exception_msg)),
+ "Got wrong message: %s", e.msg);
+ xbt_assert(e.category == unknown_error,
+ "Got wrong category: %d (instead of %d)",
+ e.category, unknown_error);
+ XBT_INFO
+ ("Got the expected exception when calling the exception raising RPC");
+ xbt_ex_free(e);
}
if (!gotit) {
THROWF(unknown_error, 0, "Didn't got the remote exception!");
}
- xbt_assert(e.value == 42, "Got wrong value: %d (!=42)", e.value);
- xbt_assert(!strncmp(e.msg, exception_msg, strlen(exception_msg)),
- "Got wrong message: %s", e.msg);
- xbt_assert(e.category == unknown_error,
- "Got wrong category: %d (instead of %d)",
- e.category, unknown_error);
- XBT_INFO
- ("Got the expected exception when calling the exception raising RPC");
- xbt_ex_free(e);
exception_catching();
}