Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not crash on failed writes but skip the file #1933

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions rosbag2_cpp/src/rosbag2_cpp/writers/sequential_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,8 @@ void SequentialWriter::switch_to_next_storage()
metadata_.relative_file_paths.size());
storage_ = storage_factory_->open_read_write(storage_options_);
if (!storage_) {
std::stringstream errmsg;
errmsg << "Failed to rollover bagfile to new file: \"" << storage_options_.uri << "\"!";

throw std::runtime_error(errmsg.str());
ROSBAG2_CPP_LOG_ERROR_STREAM("Failed to rollover bagfile to new file: \"" <<
storage_options_.uri << "\"! Nothing will be written until the next split.");
}

rosbag2_storage::FileInformation file_info{};
Expand Down