diff --git a/rosbag2_cpp/include/rosbag2_cpp/writer.hpp b/rosbag2_cpp/include/rosbag2_cpp/writer.hpp index c2597f9b0..a716d4d74 100644 --- a/rosbag2_cpp/include/rosbag2_cpp/writer.hpp +++ b/rosbag2_cpp/include/rosbag2_cpp/writer.hpp @@ -74,6 +74,7 @@ class ROSBAG2_CPP_PUBLIC Writer * more storage and converter options. * * \param storage_uri URI of the storage to open. + * \throws runtime_error if internal error happens. **/ void open(const std::string & uri); @@ -83,6 +84,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, diff --git a/rosbag2_cpp/include/rosbag2_cpp/writers/sequential_writer.hpp b/rosbag2_cpp/include/rosbag2_cpp/writers/sequential_writer.hpp index fd9aae481..ac8248088 100644 --- a/rosbag2_cpp/include/rosbag2_cpp/writers/sequential_writer.hpp +++ b/rosbag2_cpp/include/rosbag2_cpp/writers/sequential_writer.hpp @@ -77,6 +77,10 @@ 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,