Skip to content

Commit 1048e58

Browse files
feat(ofPathToString): catch system error exception
1 parent 5479de4 commit 1048e58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/openFrameworks/utils/ofFileUtils.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,9 @@ std::string ofPathToString(const of::filesystem::path & path) {
20772077
try {
20782078
return path.string();
20792079
} catch(std::filesystem::filesystem_error & e) {
2080-
ofLogError("ofFileUtils") << "ofPathToString: error converting fs::path to string " << e.what();
2080+
ofLogError("ofFileUtils") << "ofPathToString: filesystem error converting fs::path to string " << e.what();
2081+
} catch (std::system_error& e) {
2082+
ofLogError("ofFileUtils") << "ofPathToString: system error converting fs::path to string " << e.what();
20812083
}
20822084
return {};
20832085
}

0 commit comments

Comments
 (0)