Improve TRY_RESULT define

GitOrigin-RevId: 399a4102f795c0c44d3089a1a3b341393c9f0f95
This commit is contained in:
Arseny Smirnov 2018-02-16 12:09:50 +03:00
parent b171be4331
commit ccb6553a5d
2 changed files with 2 additions and 2 deletions

View File

@ -738,7 +738,7 @@ Status HttpReader::open_temp_file(CSlice desired_file_name) {
return Status::OK();
}
rmdir(r_directory.move_as_ok()).ignore();
rmdir(directory).ignore();
LOG(WARNING) << "Failed to create temporary file " << desired_file_name << ": " << second_try.error();
return second_try.move_as_error();
}

View File

@ -25,7 +25,7 @@
return try_status.move_as_error(); \
} \
}
#define TRY_RESULT(name, result) TRY_RESULT_IMPL(TD_CONCAT(r_, name), name, result)
#define TRY_RESULT(name, result) TRY_RESULT_IMPL(TD_CONCAT(TD_CONCAT(r_, name), __LINE__), name, result)
#define TRY_RESULT_IMPL(r_name, name, result) \
auto r_name = (result); \