Skip to content

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

@gDorndorf

Description

@gDorndorf

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()};

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions