X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Fthird_party%2FPluma%2FDir.cpp;h=b0494b7eee64daa7a10a442df42a2edcc2690ba7;hb=dd763c7c99bb59edcc7035738ff1ad10255e2525;hp=860220e9cca634c6607db2385903b0134ef58689;hpb=8c23766af88a29c3e830299dffc4b95d9fe61df9;p=cpPlugins.git diff --git a/lib/third_party/Pluma/Dir.cpp b/lib/third_party/Pluma/Dir.cpp index 860220e..b0494b7 100644 --- a/lib/third_party/Pluma/Dir.cpp +++ b/lib/third_party/Pluma/Dir.cpp @@ -30,6 +30,7 @@ #include #include #include +#include namespace pluma{ @@ -46,7 +47,12 @@ void listFiles(std::list& list, const std::string& folder, const st dir = opendir(folder.c_str()); if (dir == NULL){ // could not open directory - fprintf(stderr, "Could not open \"%s\" directory.\n", folder.c_str()); + // fprintf(stderr, "Could not open \"%s\" directory.\n", folder.c_str()); + throw std::runtime_error( + std::string( "Could not open \"" ) + + folder + + std::string( "\" directory." ) + ); return; }else{ // close, we'll process it next