]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/unix/dir_location.cpp
Add new exception classes for some common errors
[libs/core.git] / source / fs / unix / dir_location.cpp
index 73825875fd4df979ae1b7c5fff619af6982fb133..68d82a27f968c37d14c1e2c42aafe1814e679570 100644 (file)
@@ -1,5 +1,6 @@
 #include <msp/core/application.h>
 #include <msp/core/environ.h>
+#include <msp/core/except.h>
 #include "dir.h"
 
 using namespace std;
@@ -19,7 +20,7 @@ Path get_user_data_dir()
 {
        const string &appname = Application::get_name();
        if(appname.empty())
-               throw logic_error("no application name");
+               throw invalid_state("no application name");
 
        return get_home_dir()/("."+appname);
 }