* // available:
* try {
* // Try to get value, this might throw an exception if the operation
- * // failed (such as an exception throwed by the worker process):
+ * // failed (such as an exception thrown by the worker process):
* std::string value = result.get();
* XBT_INFO("Value: %s", value.c_str());
* }
* }
* catch (...) {
* // If an error occured, we can set an exception which
- * // will be throwed buy future.get():
+ * // will be thrown by future.get():
* promise.set_exception(std::current_exception());
* }
* });
simgrid::simix::kernel_sync([] {
return kernel_wait_until(20).then([](simgrid::kernel::Future<void> f) {
f.get();
- throw example::exception("Exception throwed from kernel_defer");
+ throw example::exception("Exception thrown from kernel_defer");
});
});
XBT_ERROR("No exception caught!");
> [Tremblay:master:(1) 0.000000] [test/INFO] kernel, returned
> [10.000000] [test/INFO] kernel_sync with void
> [Tremblay:master:(1) 10.000000] [test/INFO] kernel_sync with void, returned
-> [Tremblay:master:(1) 20.000000] [test/INFO] Exception caught: Exception throwed from kernel_defer
+> [Tremblay:master:(1) 20.000000] [test/INFO] Exception caught: Exception thrown from kernel_defer
> [30.000000] [test/INFO] kernel_sync with value
> [Tremblay:master:(1) 30.000000] [test/INFO] kernel_sync with value returned with 42
> [50.000000] [test/INFO] kernel_async with value