diff --git a/ml_io.cpp b/ml_io.cpp index 0fc3e7f..1889b65 100644 --- a/ml_io.cpp +++ b/ml_io.cpp @@ -36,7 +36,7 @@ MlValue list_dir(const std::string &path) { DIR *dirp = opendir(path.c_str()); if (dirp == NULL) { - // handle error - probably not a dir or non existing path + throw std::runtime_error("could not open dir (" + path + ")"); } struct dirent *dp; while ((dp = readdir(dirp)) != NULL) {