Skip to content

Commit

Permalink
Some exceptions for unimplemented stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Feb 21, 2024
1 parent 84de947 commit 36ae6ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2755,6 +2755,8 @@ Snapshots Series::snapshots()

break;
case Access::READ_WRITE:
throw std::runtime_error(
"[Series::snapshots()] Unimplemented for READ_WRITE mode.");
case Access::CREATE:
case Access::APPEND:
// @todo: properly distinguish here
Expand Down
6 changes: 6 additions & 0 deletions src/snapshots/ContainerImpls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ auto StatefulSnapshotsContainer::operator[](key_type const &key)
auto access = s.series.IOHandler()->m_frontendAccess;

// @todo distinguish read_write
if (access == Access::READ_WRITE)
{
throw std::runtime_error(
"[StatefulSnapshotsContainer::operator[]()] Unimplemented for "
"READ_WRITE mode.");
}
if (access::write(access))
{
auto lastIteration = base_iterator->peekCurrentlyOpenIteration();
Expand Down

0 comments on commit 36ae6ec

Please sign in to comment.