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

Missing "throws" documentation in rosbag2_cpp writer open() #1788

Open
gDorndorf opened this issue Aug 14, 2024 · 0 comments
Open

Missing "throws" documentation in rosbag2_cpp writer open() #1788

gDorndorf opened this issue Aug 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@gDorndorf
Copy link

Description

The documentation of rosbag2_cpp/include/writer.hpp and rosbag2_cpp/include/rosbag2_cpp/writers/sequential_writer.hpp are missing an entry that indicates that it may throw.

Missing documentation:

void open(const std::string & uri);

Expected Behavior

Something like this in writer.hpp and sequential_writer.hpp:

   *
   * \param storage_options Options to configure the storage
   * \param converter_options options to define in which format incoming messages are stored
+   * \throws runtime_error if 
+   * database directory already exists,
+   * failed to create database directory,
+   * no storage could be initialized,
+   * invalid bag splitting size given,
+   * max cache size less or equal 0 when snapshot mode is enabled.
   **/
  void open(
    const rosbag2_storage::StorageOptions & storage_options,

Actual Behavior

Missing documentation.

Additional context

The instances where it throws are:

throw std::runtime_error{error.str()};

throw std::runtime_error{error.str()};

throw std::runtime_error("No storage could be initialized. Abort");

throw std::runtime_error{error.str()};

@gDorndorf gDorndorf added the bug Something isn't working label Aug 14, 2024
gDorndorf pushed a commit to gDorndorf/rosbag2 that referenced this issue Aug 14, 2024
Document that open() may throw.

Signed-off-by: Georg Dorndorf <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant