]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/unix/process.cpp
Add new exception classes for some common errors
[libs/core.git] / source / core / unix / process.cpp
index 7370b70803f94bff6c24c57a3adb453f5ea6682a..975fa223520486fd59122ae90e17e322fd4e755a 100644 (file)
@@ -4,6 +4,7 @@
 #include <msp/core/systemerror.h>
 #include <msp/fs/dir.h>
 #include <msp/io/console.h>
+#include "except.h"
 #include "process.h"
 #include "process_private.h"
 
@@ -70,7 +71,7 @@ void Process::execute(const string &command, bool path_search, const Arguments &
 bool Process::wait(bool block)
 {
        if(!running)
-               throw logic_error("not running");
+               throw invalid_state("not running");
 
        int status;
        int pid = waitpid(priv->info.pid, &status, (block ? 0 : WNOHANG));