From 70f53431d1e178e20a58576b7016df141fa97dc3 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 2 Jul 2019 15:29:33 +0200 Subject: [PATCH] Use std::future_error. --- include/xbt/future.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/xbt/future.hpp b/include/xbt/future.hpp index 95ab69d666..31870ce502 100644 --- a/include/xbt/future.hpp +++ b/include/xbt/future.hpp @@ -12,6 +12,7 @@ #include #include #include +#include // std::future_error #include #include #include @@ -66,7 +67,7 @@ public: break; } default: - throw std::logic_error("Invalid result"); + throw std::future_error(std::future_errc::no_state); } } private: -- 2.20.1