Skip to content

Commit

Permalink
Simplify error handling & more meaningful message
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 624734624
Change-Id: Ica7ab6cd6ae95b1fbbbcf0f44945f36306f1f8ec
  • Loading branch information
happyCoder92 authored and Copybara-Service committed Apr 14, 2024
1 parent 461a4d6 commit f9af86f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions sandboxed_api/sandbox2/executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ absl::StatusOr<SandboxeeProcess> Executor::StartSubProcess(int32_t clone_flags,
if (!path_.empty()) {
exec_fd_ = file_util::fileops::FDCloser(open(path_.c_str(), O_PATH));
if (exec_fd_.get() < 0) {
if (errno == ENOENT) {
return absl::ErrnoToStatus(errno, path_);
}
return absl::ErrnoToStatus(errno,
absl::StrCat("Could not open file ", path_));
}
Expand Down

0 comments on commit f9af86f

Please sign in to comment.