-/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
msg_task_t task = MSG_task_create("COMM", 0, 100000000, NULL);
MSG_task_dsend(task, mailbox, task_cleanup_handler);
// We should wait a bit (if not the process will end before the communication, hence an exception on the other side).
- int res = MSG_process_sleep(30);
- if (res == MSG_HOST_FAILURE) {
+ try {
+ MSG_process_sleep(30);
+ } catch (simgrid::HostFailureException& e) {
XBT_INFO("The host has died ... as expected.");
}
XBT_INFO(" TX done");