diff --git a/src/threading/scheduler/Scheduler.cpp b/src/threading/scheduler/Scheduler.cpp index 175988d0..d49b5090 100644 --- a/src/threading/scheduler/Scheduler.cpp +++ b/src/threading/scheduler/Scheduler.cpp @@ -22,6 +22,7 @@ #include "Scheduler.hpp" #include +#include #include "../../dsl/word/MainThread.hpp" #include "../../dsl/word/Pool.hpp" @@ -116,7 +117,8 @@ namespace threading { if (pools.count(desc) == 0) { // Don't make new pools if we are shutting down if (!running.load(std::memory_order_acquire)) { - throw std::runtime_error("Cannot create new pools after the scheduler has started shutting down"); + throw std::invalid_argument( + "Cannot create new pools after the scheduler has started shutting down"); } // Create the pool