rawtoaces
rawtoaces copied to clipboard
fix: prefer std::filesystem error_code overloads over exceptions
Replaced throwing std::filesystem calls with non-throwing error_code
overloads in process_image() and make_output_path().
Changes
process_image(): Removed try/catch aroundstd::filesystem::exists(), now usesstd::filesystem::exists(path, ec)with explicit error_code handlingmake_output_path(): Updatedexists()andcreate_directory()calls to use error_code overloads- Preserves existing Status::FilesystemError and Status::InputFileNotFound behavior
Why
The C++ standard library allows querying filesystem operations with error_code instead of exceptions. This avoids exception-based control flow for expected filesystem failures and is consistent with modern C++ best practices.
Closes #275
- :x: - login: @hesam-oxe / name: hesam-oxe. The commit (69b7063bafa83aa193f3178adb5e763271ed8713, d366babe37f8835b2278fb150b905cb977fd51cf) is not authorized under a signed CLA. Please click here to be authorized. For further assistance with EasyCLA, please visit our EasyCLA portal and chat with our support bot.