Skip to content

Commit

Permalink
Add missing throws documentation rosbag_cpp writer open ros2#1788
Browse files Browse the repository at this point in the history
Document that open() may throw.

Signed-off-by: Georg Dorndorf <[email protected]>
  • Loading branch information
Georg Dorndorf committed Aug 14, 2024
1 parent ce918b7 commit 42c881f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rosbag2_cpp/include/rosbag2_cpp/writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ class ROSBAG2_CPP_PUBLIC Writer
* more storage and converter options.
*
* \param storage_uri URI of the storage to open.
* \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 std::string & uri);

Expand All @@ -83,6 +89,12 @@ class ROSBAG2_CPP_PUBLIC Writer
*
* \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,
Expand Down
6 changes: 6 additions & 0 deletions rosbag2_cpp/include/rosbag2_cpp/writers/sequential_writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ class ROSBAG2_CPP_PUBLIC SequentialWriter
*
* \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,
Expand Down

0 comments on commit 42c881f

Please sign in to comment.